I'm trying to create a Macro for opening the Save As dialog box, so I have this:
Dialogs(wdDialogFileSaveAs).Show
Which seems to work great. However, I would like to change the File format to .docx instead of .docm. Currently the default one in the Save-As dialog box is showing as a macro-enabled document. I tried to fiddle around with FileFormat, but couldn't get it to work with the Show Dialog from above.
I did have this code working, which changed the file format to .docx, but now I would like it not to save it for me, but to allow me to change the file name and file location manually (by opening the FileSaveAs dialog box), but I still want it to change the file format.
ChangeFileOpenDirectory _
"D:\Company\Team Files\TECH\"
ActiveDocument.SaveAs2 FileName:="Macro templates.docm", _
FileFormat:=wdFormatXMLDocumentMacroEnabled, LockComments:=False, _
Password:="", AddToRecentFiles:=True, WritePassword:="", _
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, CompatibilityMode:=15
Dialogs(wdDialogFileSaveAs).Show
Which seems to work great. However, I would like to change the File format to .docx instead of .docm. Currently the default one in the Save-As dialog box is showing as a macro-enabled document. I tried to fiddle around with FileFormat, but couldn't get it to work with the Show Dialog from above.
I did have this code working, which changed the file format to .docx, but now I would like it not to save it for me, but to allow me to change the file name and file location manually (by opening the FileSaveAs dialog box), but I still want it to change the file format.
ChangeFileOpenDirectory _
"D:\Company\Team Files\TECH\"
ActiveDocument.SaveAs2 FileName:="Macro templates.docm", _
FileFormat:=wdFormatXMLDocumentMacroEnabled, LockComments:=False, _
Password:="", AddToRecentFiles:=True, WritePassword:="", _
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, CompatibilityMode:=15