Force save when using File New

R

Ricki Miles

I am creating a template in Word 2003. When the template is used by
choosing File, New, I would like the Save As dialog box to come up
automatically to force the user to save it in a folder and with a filename
of their choice. I can record the macro and save it as AutoNew, but I can't
close the dialog box during the recording.

Thanks,

Ricki
 
J

Jezebel

You can't create good macros by recording. Recording is useful to give you
an idea of how to do something, and as a shortcut for repetitive keystrokes.
But to create useful macros you need to write your own code. In this case,
add this line to your AutoNew macro --

Dialogs(wdDialogFileSaveAs).Show

This doesn't quite 'force' the user to save the document: they can still
cancel the dialog. You can check for this if you need to. Read Help on the
Dialogs object and see the examples on using the return value.
 
R

Ricki Miles

Thanks very much,

Ricki

Jezebel said:
You can't create good macros by recording. Recording is useful to give you
an idea of how to do something, and as a shortcut for repetitive keystrokes.
But to create useful macros you need to write your own code. In this case,
add this line to your AutoNew macro --

Dialogs(wdDialogFileSaveAs).Show

This doesn't quite 'force' the user to save the document: they can still
cancel the dialog. You can check for this if you need to. Read Help on the
Dialogs object and see the examples on using the return value.
 

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