Your code simply sets a document property. It does not set the file path. To change the path, use
However it is not necessary to do that to save a document in a specific location. If you want to save a document in a specific folder you must set that folder first e.g.
Code:
Dim dtToday As String
Dim sPath As String
sPath = Options.DefaultFilePath(wdDocumentsPath) & "\"
dtToday = Format(Date, "ddmmyyyy")
MsgBox sPath & "Waiver_" & dtToday & ".docx"
ActiveDocument.SaveAs2 sPath & "Waiver_" & dtToday & ".docx"
Note that
Code:
Dim dtToday As Date
dtToday = Date
produces the system short date format and that may result in illegal filename characters e.g. 02/04/2022 so set dtDate as a string variable and format the date to produce legal filename characters e.g 02042022 as in the previous example.