VisWebPageSettings Object

Visio Save As Web Reference

Contains the settings for the Web page.

Remarks

The VisWebPageSettings object serves as a container for a Web page's properties.

Many of the properties of the VisWebPageSettings object correspond to the settings in the Save As dialog box when a user clicks Save as Web Page on the File menu.

For example, the PageTitle property, which contains the title that appears in the title bar when a Web page is displayed in a browser, corresponds to the value in the Page title box in the Set Page Title dialog box (in the Save As dialog box, click Change Title). Also, the DispScreenRes property corresponds to the value selected in the Target Monitor list on the Advanced tab of the Save As Web Page dialog box (on the File menu, click Save As Web Page, and then click Publish).

When you want to create a Web page, use the WebPageSettings property of the VisSaveAsWeb object to get a reference to the VisWebPageSettings object, which you can use to set the Web page's properties, as shown in the following example.

Visual Basic for Applications
  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 do not call the AttachToVisioDoc method to
' identify a specific document, Visio saves the 
' active document by default.
vsoSaveAsWeb.CreatePages     

End Sub

Aa463359.vs_note(en-us,office.12).gif  Note
To view the VisWebPageSettings class in the Object Browser, make sure that you have a reference to the Save As Web Page DLL in your project (in the Visual Basic Editor window, click References on the Tools menu, and then select the Microsoft Visio 12.0 Save As Web Type Library check box in the Available References list).

See Also