![]() |
|
#1
|
|||
|
|||
|
Hi,
I have written some vba code to run before save in the following method. Everything works fine, expect that the save as dialog not starts in the folder selected by the user. Eg. User click the marked folder, then I expect that the saveas dialog afterwards will start in this folder, but it starts in the default folder for the user. I can't use the Application.FileDialog, because this dialog is missing the properties, like manager, subject etc. My code is pasted here: Code:
Private Sub oApp_DocumentBeforeSave(ByVal Doc As Document, _
SaveAsUI As Boolean, Cancel As Boolean)
If (SaveAsUI = False And HasDocumentBeenSaved = False) Then
Exit Sub
End If
If (ActiveDocument.AttachedTemplate <> "Normal.dotm") Then
Dim intChoice As Integer
Dim strPath As String
If (HasDocumentBeenSaved = False Or SaveAsUI = True) Then
With Dialogs(wdDialogFileSaveAs)
.name = SpecializedHelper.FileName
.Show
End With
Else
ActiveDocument.Save
End If
Cancel = True
End If
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Word 2010 "Save As" has no folders
|
EweWho | Word | 17 | 06-05-2017 09:40 AM |
Word doc is opened on recent list, pop up: "you don't have permission to open", deleted.
|
wordhasfailedmetwice | Word | 3 | 11-17-2016 04:09 PM |
| How to use a "Save As" button without causing digital signatures to become "Invalid"? | jferg | Word VBA | 0 | 02-16-2016 03:04 PM |
| "Open Recent" and "More..." in Excel and Word | BudVitoff | Office | 0 | 04-03-2015 09:17 PM |
| Disable "Save" & "Save As" & "Print" ribbon | Villalobos | Word VBA | 3 | 07-14-2014 11:37 PM |