I am trying to use wdDialogFileSaveAs in a macro so my user can save their doc after they have filled it in.
Since the macro is in a template, when the dialog opens, it always opens in the default template folder and not where the doc should be saved.
I have used .Name after setting it to a concatenation of the FilePath & the FileName. That didn't work.
I have used ChangeFileOpenDirectory to set the folder and that doesn't work, either.
The really weird thing is that if I just try calling the SaveAs macro, it works, but if I call it from another macro, it fails every time.
Any help would be greatly appreciated.
TIA,
Bob Mathis
Code:
*********************************************************************
Option Explicit
Public Sub SaveAsMacro()
Dim strPath As String
Dim strFile As String
strPath = "C:\Documents and Settings\isd109\Desktop"
strFile = "_My Test.doc"
ActiveDocument.SaveAs _
FileName:=strPath & strFile, _
FileFormat:=wdFormatDocument, _
LockComments:=False, _
Password:="", _
AddToRecentFiles:=True, _
WritePassword:="", _
ReadOnlyRecommended:=False, _
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, _
SaveFormsData:=False, _
SaveAsAOCELetter:=False
End Sub
*********************************************************************