VisSaveAsWeb object (Visio Save As Web)

Contains the webpage property settings and methods used when a Visio drawing is saved as a webpage.

Remarks

The VisSaveAsWeb object contains the methods and property settings that are used when a selected Visio drawing is saved as a webpage. The webpage 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 webpage, 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 webpage. 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 webpage. 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 that you specify, or a location that you specify in the TargetPath property of the VisWebPageSettings object.

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

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

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, choose References on the Tools menu, and then select the Microsoft Visio 15.0 SaveAsWeb Type Library check box in the Available References list).

Methods

Properties

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.