包含網頁的設定。
註解
VisWebPageSettings 物件可做為網頁屬性的容器。
VisWebPageSettings 物件的許多屬性會對應至當使用者選擇 [檔案] 索引標籤>、[匯出>] 變更檔案類型>、[網頁] (*.htm) > [另存新檔] 時,[另存新檔] 對話方塊中可用的設定。
例如,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 類別,請確定專案中有另存為網頁 DLL 的參照 (在 Visual Basic 編輯器視窗中,選擇 [工具] 功能表上的 [參照],然後選取 [Microsoft Visio 15.0 另存為網頁類型程式庫] 核取方塊) [可用參照] 清單。
方法
屬性
- AltFormat
- DispScreenRes
- EndPage
- FormatCount
- NavBar
- OpenBrowser
- PageTitle
- PanAndZoom
- PriFormat
- PropControl
- QuietMode
- Search
- SecFormat
- SilentMode
- StartPage
- StoreInFolder
- Stylesheet
- TargetPath
- ThemeName
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。