View Single Post
 
Old 03-17-2012, 01:06 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Dave,

You could add code like the following to each template's 'ThisDocument' module. As coded, it prompts the user to save the file immediately it's created and defaults to whatever path is specified for the StrTmpPath variable and with whatever filename's specified for the StrName variable (which i've coded for the user's name and the system date in ISO format.
Code:
Private Sub Document_New()
Dim StrName As String, StrDefPath As String, StrTmpPath As String
StrName = Environ("UserName") & Format(Now, "YYYYMMDD")
StrTmpPath = "Filepath for documents based on this template"
StrDefPath = Options.DefaultFilePath(wdDocumentsPath)
Options.DefaultFilePath(wdDocumentsPath) = StrTmpPath
With Application.Dialogs(wdDialogFileSaveAs)
  .Name = StrName
  .Show
End With
Options.DefaultFilePath(wdDocumentsPath) = StrDefPath
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote