1

I got the following code to open the save dialog with one FileType:

Set objDialog = CreateObject("SAFRCFileDlg.FileSave")
objDialog.FileName = "Automatic Generated Presentation"
objDialog.FileType = "PowerPoint 97-2003 Presentation (*.ppt)"
objDialog.OpenFileSaveDlg

How can I add another FileType to the combobox / listbox in the dialog?
I tried to seperate them using '|', using ',', using ';' and more - nothing worked ofcourse.

Is that even possible?
I didnt find anything like that in the internet.

Will appreciate your help.

Ron
  • 3,975
  • 17
  • 80
  • 130

1 Answers1

1

I've found an interesting article where the author debugs Windows API calls made by the SAFRCFileDlg.FileSave object to find out whether it allows multiple file filters:
Debugging the SAFRCDLG.DLL FileType filter string

The answer is No.

Helen
  • 87,344
  • 17
  • 243
  • 314
  • Is there another way to call File Save Dialog which allow multiple filters, and not SAFRCFileDlg? – Ron Feb 05 '13 at 15:39
  • @Ron: `MSComDlg.CommonDialog` allows multiple file filter (e.g. `objDialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"`), but it requires a license. See [this answer](http://stackoverflow.com/a/4464323/113116) for details. Don't know if there're other ActiveX dialog components with this functionality. – Helen Feb 05 '13 at 16:04