MS Word SaveAs dialog box with filters

I want to save a custom file from VBA code in Microsoft Word. Is there a suitable SaveAs dialog in Word VBA? What I need from this dialog:

  • to specify a custom filter;
  • to select a file that (possibly) does not exist;
  • Use Word VBA only if possible.

The solutions I found on this site are:

  • Application.FileDialog (msoFileDialogSaveAs). Does not allow you to specify a custom filter.
  • Application.FileDialog (msoFileDialogFolderPicker). It does not allow you to select a file that does not exist (this is a file open dialog, not a SaveAs file).
  • Application.GetSaveAsFilename. Works in Excel, but not in Word.
  • Using the Windows API. I want to avoid this if possible.
  • Call an Excel application from Word VBA and use GetSaveAsFilename. An ugly solution. Is there another way?
+4
source share
1 answer

Is Word Interop an Acceptable Alternative to You? If so, you can use the SaveAs of the Document class.

0
source

All Articles