# Microsoft Word VBA to save as prompting user to enter file name & path



## Claire Jackson (Nov 17, 2020)

Hi,

I have a word template document with a userform which populates several bookmarks.  What I need is a simple code that upon populating the word document from the userform via the command button click it then asks for a new save location for the normal word document and then closes the template without saving.

I know it's a basic question but for the life of me I can't find the solution?

Please help?


----------



## NdNoviceHlp (Nov 17, 2020)

HTH. Dave








						Application.FileDialog property (Word)
					

Office VBA reference topic



					docs.microsoft.com


----------



## Macropod (Nov 18, 2020)

If you are actually using a Word template they way Word templates are supposed to be used, the user will have little choice but to save the new document without affecting the template.


----------



## Claire Jackson (Nov 18, 2020)

I get that but do you have the code anyway?


----------



## Macropod (Nov 18, 2020)

It can be as simple as:

```
Application.Dialogs(wdDialogFileSaveAs).Show
```
You cannot close the parent template while to document remains open. Word does that automatically when you close the document.


----------



## Claire Jackson (Nov 18, 2020)

Excellent, thank you so much


----------

