A family of Microsoft word processing software products for creating web, email, and print documents.
- You must set the FilterIndex to 2, because Macro-enabled documents are the second file type in the list.
- Execute doesn't actually save the document, you have to do that yourself. FileDialog only lets the user specify a path and filename.
Set fd = Application.FileDialog(msoFileDialogSaveAs)
With fd
.FilterIndex = 2
.InitialFileName = ProposedFileName
If .Show Then
ActiveDocument.SaveAs2 FileName:=.SelectedItems(1), _
FileFormat:=wdFormatXMLDocumentMacroEnabled
End If
End With
Set fd = Nothing