Cannot seem to set the path for Word 2016 SaveAs screen. The statement
Code:
MsgBox Options.DefaultFilePath(wdDocumentsPath)
displays the directory I want.
But, after executing
Code:
'source: based on https://wordmvp.com/FAQs/MacrosVBA/SetDefFilename.htm
'change properties
Dim dtToday As Date
dtToday = Date
If Documents.Count > 0 Then
Set dlgProp = Dialogs(wdDialogFileSummaryInfo)
' Establish title
dlgProp.Title = "Waiver_" & dtToday & ".docx"
' Set the values
dlgProp.Execute
' Show the dialog for testing purposes
dlgProp.Show
End If
The SaveAs dialog box shows up but with an entirely different path.
And with the bogus message
Quote:
You don't currently have permission to access this folder
|
(It's the the path I last used to save a .docm document).
The keywords I use in this forum's search bring up how to change file names, but not directories.
I guess this ability qualifies merely as a "nice to have". But it really would be a nice-to-have.