How to display FileSaveAs dialog box using VBA?

J

JoAnn

Hi,
I am creating a FileSaveAs macro to replace Word's FileSaveAs command so I
can perform a "customized save as" under certain conditions.

To run Word's default Save As, I entered the code "ActiveDocument.SaveAs".
However, this doesn't display the FileSaveAs dialog box. How can I get the
Word default Save As behavior using VBA?

Thanks for your help!
 
J

Jezebel

Read Help on Word's Dialogs() collection -- this contains most of Word's
dialogs. You can Show a dialogs to use it as normal, display it to use it
without executing any actions, or execute it to use it without displaying
it. The SaveAs dialog is

dialogs(wdDialogFileSaveAs)

In this particular case, if all you're doing is getting a file name, you
might find it easier to use a CommonDialog control.
 

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