Save As Macro on Opening Template

  • Thread starter Thread starter Silena K-K
  • Start date Start date
S

Silena K-K

On opening a template, I want the user to Save the document into a specific
folder before they enter data. Can someone please tell me how to do this?

Regards, Silena
 
Presumably your users would be creating a new document from the template
rather than opening the template?
How is the document to be named?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Yes they would be creating a new document from the template.

The name of the new document would include an assigned validation number and
protocol type eg: 573AssayProtocol.doc.

Silena
 
Would the files created from this template always be stored in the same
specific folder, or would the folder depend on some other factor e.g. the
protocol? In which case how would the macro know how to choose that folder
when there is no data entered into the document for it to evaluate?

The following will change the file open directory to that indicated (here
D:\My Documents\Test\Versions\ - which must pre-exist) and give the user the
opportunity to name the file

Sub Autonew()
On Error GoTo UserCancelled
ChangeFileOpenDirectory "D:\My Documents\Test\Versions\"
ActiveDocument.Save
Exit Sub
UserCancelled:
MsgBox "User cancelled - document not saved!", _
vbCritical, "Error"
End Sub

http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top