Open a copy of a doc

R

ronben

Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel In Word 2004, my original copy of a document(which is a form) is like the template. I do not want to change the original doc but open it a a copy. I want to automate this process but the recorded macro doesn't seem to show that the doument is a copy rather than the original. When I recorded the macro at a workplace with a Windows machine, the word "copy" appears in the macro. How can I be sure that the macro running on the Mac is opening only a copy?

Ron
 
J

John McGhie

Hi Ron:

The best way is to save the template as a template :)

Then record a File>New>From Template and navigate to the template, and
choose Copy.

That will record different code.

But this is the kind of thing you should really "write" not "record".

You really need the VBA Reference. Use the one from Word 2003: it's here:
http://msdn.microsoft.com/en-us/library/aa272078(office.11).aspx

The example you want is this one:
This example creates a new document based on the Professional Memo template.

Documents.Add Template:="C:\Program Files\Microsoft Office" _
& "\Templates\Memos\Professional Memo.dot"

Note the continuation ‹ it's all one line in VBA.

You can't record this command. It "Adds" a document to the collection of
open documents in Word. By specifying the fully-qualified path and name to
the template, you will end up with a Document named "Document 1" that has
been copied from the template specified.

Of course, use colons on the Mac.

Hope this helps


Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel In Word
2004, my original copy of a document(which is a form) is like the template. I
do not want to change the original doc but open it a a copy. I want to
automate this process but the recorded macro doesn't seem to show that the
doument is a copy rather than the original. When I recorded the macro at a
workplace with a Windows machine, the word "copy" appears in the macro. How
can I be sure that the macro running on the Mac is opening only a copy?

Ron

This email is my business email -- Please do not email me about forum
matters unless you intend to pay!

--

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top