VisSaveAsWeb Object

Contains the Web page property settings and methods used when a Microsoft Visio drawing is saved as a Web page.

Remarks

The VisSaveAsWeb object contains the methods and property settings that are used when a selected Microsoft Visio drawing is saved as a Web page. The Web page project includes the following files:

  • An HTML version of the drawing (including shape data, formerly called custom properties, and multiple drawing pages, if applicable)

  • The supporting files associated with the project, for example, the graphics files (GIFs and JPGs), script files, data (XML) files, and cascading style sheet (CSS) files.

To set the properties for your Web page, use the WebPageSettings property of the VisSaveAsWeb object to get a VisWebPageSettings object. After the properties are set, perform the following steps.

  1. Call the AttachToVisioDoc method to specify the drawing to be saved as a Web page. For example:

    vsoSaveAsWeb.AttachToVisioDoc _ 
    Application.Documents.Open("drive:\folder\drawingname.vdx")
    

    If you don't call this method, Visio creates the page from the active document by default.

  2. Call the CreatePages method to create the Web page. For example:

    vsoSaveAsWeb.CreatePages vsoSaveAsWeb.CreatePages
    

You can control certain user interface behavior during page creation by using the SilentMode property or the QuietMode property of the VisWebPageSettings object.

The files created by the Save as Web Page feature are placed into the target path you specify, or a location you specify in the TargetPath property of the VisWebPageSettings object.

Note

You must specify a target path, or Visio will generate an error.

They can be organized as flat files or in a subfolder that has the same name as the drawing (see the StoreInFolder property of the VisWebPageSettings object).

Note

To view the VisSaveAsWeb 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 14.0 SaveAsWeb Type Library check box in the Available References list).