![]() |
|
|
|
#1
|
||||
|
||||
|
Hi Sheeand,
Probably the simplest solution is to add a 'Document_New' sub to your Journal template's 'ThisDocument' module, coded as: Code:
Private Sub Document_New()
Dim StrPath As String
Strpath = "C:\Users\" & Environ("UserName") & "\Documents\Journals\"
ActiveDocument.SaveAs2 FileName:=StrPath & "Journal " & Format(Now, "YYYY-MM-DD"), Fileformat:=wdFormatXMLDocumentMacroEnabled
End Sub
Alternatively, you could use a '' macro coded like: Code:
Sub FileSave()
Dim StrPath As String
StrPath = "C:\Users\" & Environ("UserName") & "\Documents\Journals\"
With ActiveDocument
If Right(Split(.Name, ".")(0), 10) Like "[####-##-##]" Then
.Save
Else
.SaveAs2 FileName:=StrPath & "Journal " & Format(Now, "YYYY-MM-DD"), Fileformat:=wdFormatXMLDocumentMacroEnabled
End If
End With
End Sub
You will, of course, need to edit the filepath in the 'StrPath' variable to suit your requirements. Note also my somewhat simpler method of adding the date string.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Current date vertical status line: How to turn off?
|
Pmacdaddy | Project | 4 | 01-04-2022 09:53 AM |
Meaning of current date vs status date when saving baselines
|
ketanco | Project | 1 | 02-08-2012 02:20 PM |
How to insert current date into default filename ?
|
czomberzdaniela | Word | 1 | 12-27-2011 07:18 PM |
How to call current PC date and/or current PC year
|
KIM SOLIS | Excel | 2 | 11-04-2011 06:09 PM |
Auto insert current month's name and current year
|
Styler001 | Word | 4 | 01-25-2010 06:40 PM |