【发布时间】:2014-03-27 11:00:46
【问题描述】:
我想将 PPT 演示文稿导出为 .html 文件。因此我有 VBA 代码
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 文件的文件过滤器。
【问题讨论】:
标签: vba powerpoint savefiledialog filefilter