![]() |
#2
|
||||
|
||||
![]()
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] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Disable "do you also want to save changes to the document template?" harassalog. | wornways | Word | 30 | 06-04-2016 02:32 PM |
![]() |
webharvest | Word VBA | 1 | 06-29-2011 04:56 PM |
"Back" Button - to behave like web browser (Not using last slide viewed). | emmiewoo | PowerPoint | 0 | 03-29-2011 06:54 AM |
![]() |
MAS | Word | 3 | 02-25-2011 12:00 AM |
"Send and Receive all Folders" button missing (but only with one account) | incognitus | Outlook | 0 | 10-12-2010 10:42 PM |