Powerpoint VBA宏另存为对话框文件筛选器
我想将PPT演示文稿导出到.html文件。因此我有VBA代码Powerpoint VBA宏另存为对话框文件筛选器,vba,powerpoint,savefiledialog,filefilter,Vba,Powerpoint,Savefiledialog,Filefilter,我想将PPT演示文稿导出到.html文件。因此我有VBA代码 Sub HTMLExport() ActivePresentation.SaveAs "C\Users\test\pptInHtml.htm", ppSaveAsHTML, msoFalse End Sub 这是可行的,但我需要一个“另存为对话框”的代码,用户可以在其中选择将文件保存为html的路径(用户只能选择“另存为html”,其他什么都不能选择) 这是我的SaveAsDialog的代码 Sub ShowSaveAsDi
Sub HTMLExport()
ActivePresentation.SaveAs "C\Users\test\pptInHtml.htm", ppSaveAsHTML, msoFalse
End Sub
这是可行的,但我需要一个“另存为对话框”的代码,用户可以在其中选择将文件保存为html的路径(用户只能选择“另存为html”,其他什么都不能选择)
这是我的SaveAsDialog的代码
Sub ShowSaveAsDialog()
Dim dlgSaveAs As FileDialog
Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs)
With dlgSaveAs
If .Show = -1 Then
.Execute
End If
End With
End Sub
但是现在,我需要一个.html文件的文件过滤器。声明自定义过滤器不幸不能用于另存为对话框
因此,似乎最好的选择是按照OP的建议创建对话