Code for File, Save As

R

Ricki Miles

I would like to end my macro with the File, Save As dialog box opening up so
the user can put in a name. What is the VBA language to display the File,
Save As dialog box? Thanks,

Ricki
 
D

Doug Robbins - Word MVP

Hi Ricki,

If the document has not previously been saved, then using

[documentobject].SaveAs

will cause the File SaveAs dialog to appear. If it has previously been
saved, then you will need to use

Dialogs(wdDialogFileSaveAs).Show

to get it to appear as otherwise, the .SaveAs command will just save the
document with its present filename.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
R

Ricki Miles

Thanks, Doug, that is the code I needed.

Ricki

Doug Robbins - Word MVP said:
Hi Ricki,

If the document has not previously been saved, then using

[documentobject].SaveAs

will cause the File SaveAs dialog to appear. If it has previously been
saved, then you will need to use

Dialogs(wdDialogFileSaveAs).Show

to get it to appear as otherwise, the .SaveAs command will just save the
document with its present filename.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
Ricki Miles said:
I would like to end my macro with the File, Save As dialog box opening
up
so
the user can put in a name. What is the VBA language to display the File,
Save As dialog box? Thanks,

Ricki
 

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