5 replies
by dklippert
In the folllowing code, the "Historic Directory" must exist (or change the name to what ever you want, The date can not use "/", so I used "-"
There is an empty line between each line of code to compensate for text wrap.
Sub SaveFilenameAndDate()
Dim PathAndFileName As String
PathAndFileName = "C:\Historic Directory\Population Report "
PathAndFileName = PathAndFileName & Format(Date, "mm-dd-yy")
PathAndFileName = PathAndFileName & ".doc"
ActiveDocument.SaveAs PathAndFileName
End Sub
by watch4
No points requested for this.
If you change that format string to "YYYYMMDD" you'll be able to sort your files by date.
by watch4
by watch4
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending