包含网页的设置。
备注
VisWebPageSettings 对象充当网页属性的容器。
当用户选择“文件”选项卡>“导出”、“>更改文件类型>网页” (*.htm) > 另存为时,VisWebPageSettings 对象的许多属性对应于“另存为”对话框中可用的设置。
例如,PageTitle 属性(该属性包含当浏览器中显示网页时出现在标题栏中的标题)对应于“设置页面标题”对话框中“ (”另存为“对话框>”更改标题) “中的值。
此外,DispScreenRes 属性对应于“另存为网页”对话框的“高级”选项卡上的“目标监视器”列表中选择的值 (“另存为”对话框 >“另存为类型列表>” 网页 (*.htm;*.html) >发布) 。
若要创建网页,请使用 VisSaveAsWeb 对象的 WebPageSettings 属性获取对 VisWebPageSettings 对象的引用,可用于设置网页的属性,如下例所示。
Public Sub VisWebPageSettingsObject_Example()
Dim vsoWebSettings As VisWebPageSettings
Dim vsoSaveAsWeb As VisSaveAsWeb
' Query Visio for the VisSaveAsWeb object.
Set vsoSaveAsWeb = Visio.Application.SaveAsWebObject
' Get a WebPageSettings object.
Set vsoWebSettings = vsoSaveAsWeb.WebPageSettings
With vsoWebSettings
' Set the title that is displayed in the browser's title bar.
.PageTitle = "AccountingDeptOrgChart082501"
' Prevent dialog boxes from appearing in the user interface.
.QuietMode = True
End With
' If you don't call the AttachToVisioDoc method to
' identify a specific document, Visio saves the
' active document by default.
vsoSaveAsWeb.CreatePages
End Sub
注意
若要在对象浏览器中查看 VisWebPageSettings 类,请确保在 Visual Basic 编辑器窗口中引用项目中的“另存为网页 DLL” (,在“工具”菜单上选择“引用”,然后在“可用引用”列表) 中选中“Microsoft Visio 15.0 另存为 Web 类型库”检查框。
方法
属性
- AltFormat
- DispScreenRes
- EndPage
- FormatCount
- NavBar
- OpenBrowser
- PageTitle
- PanAndZoom
- PriFormat
- PropControl
- QuietMode
- Search
- SecFormat
- SilentMode
- StartPage
- StoreInFolder
- Stylesheet
- TargetPath
- ThemeName
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。