Macro to change save folder

  • Thread starter Thread starter mcp6453
  • Start date Start date
M

mcp6453

I'm working on a template for an elderly gentleman who would like for
the document created from the template to be automatically saved to a
particular folder under My Documents. I don't want to modify the file
locations per se. Isn't there some way to change the save folder when a
template is used?
 
Yes, you can add these two macros to the template, and change the path
in the second macro to the preferred one.

Public Sub FileSave()
If Len(ActiveDocument.Path) = 0 Then
FileSaveAs
Else
ActiveDocument.Save
End If
End Sub

Public Sub FileSaveAs()
With Dialogs(wdDialogFileSaveAs)
.Name = "c:\temp\"
.Show
End With
End Sub

Because they're in your template, they'll affect only documents based
 
Jay said:
Yes, you can add these two macros to the template, and change the path
in the second macro to the preferred one.

Public Sub FileSave()
If Len(ActiveDocument.Path) = 0 Then
FileSaveAs
Else
ActiveDocument.Save
End If
End Sub

Public Sub FileSaveAs()
With Dialogs(wdDialogFileSaveAs)
.Name = "c:\temp\"
.Show
End With
End Sub

Because they're in your template, they'll affect only documents based
on that template.

Thanks, Jay. I'll give them a try.
 

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

Back
Top