View Single Post
 
Old 03-30-2022, 07:32 AM
grNadpa grNadpa is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Mar 2022
Posts: 46
grNadpa is on a distinguished road
Default Set (temporary) SaveAs path

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.
Reply With Quote