Macro to open a document as copy; not original

R

ronben

Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel My question is somewhat related to a previous question: If I open the original document (while recording a macro), and then open it as a copy (again recording a macro) by first selecting 'Copy' which then displays with the default name, 'Document', and then compare the macros I do not see any obvious difference in the code that distinguishes the original from the copy. I want to automate the process of opening the document as a copy and not under the original filename. Can it be that the code is the same for these two different tasks?

Thanks.
 
J

John McGhie

Hi Ron:

Well, the problem is a little esoteric :)

The literal answer to your question is "Yes, Word uses exactly the same
command to open the file in each case". In VBA, you then need to follow up
with a "Save As" command to write the file as a different file name in VBA.

From the User Interface, Mac Word enables you to "half-complete" the Save As
command by specifying "open as copy". But that command is actually
happening in the Finder (the File>Open dialog is a Finder window, it's not
part of Word) so you can't record much of what goes on there.

To make a macro that handles files useful, you really need to WRITE that
part, because if you record, you can only ever open one file, the one named
in the code.

By writing, you can produce a macro that opens the file you specify each
time.

Hope this helps


Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel My
question is somewhat related to a previous question: If I open the original
document (while recording a macro), and then open it as a copy (again
recording a macro) by first selecting 'Copy' which then displays with the
default name, 'Document', and then compare the macros I do not see any obvious
difference in the code that distinguishes the original from the copy. I want
to automate the process of opening the document as a copy and not under the
original filename. Can it be that the code is the same for these two different
tasks?

Thanks.

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

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