Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Document Object (Visio)

Published: July 16, 2012

Represents a drawing file (.vsd or .vdx), stencil file (.vss or .vsx), or template file (.vst or .vtx) that is open in an instance of Microsoft Visio. A Document object is a member of the Documents collection of an Application object.

The default property of a Document object is Name.

Use the Open method of a Documents collection to open an existing document.

Use the Add method of a Documents collection to create a new document.

Use the ActiveDocument property of an Application object to retrieve the active document in an instance.

Use the Pages, Masters, and Styles properties of a Document object to retrieve Page, Master, and Style objects, respectively.

Note Note

Use the CustomMenus or CustomToolbars properties of a Document object to access the custom menus or toolbars.

Note Note

The Microsoft Visual Basic for Applications (VBA) project of every Visio document also has a class module called ThisDocument. When you reference the ThisDocument module from code in a VBA project, it returns a reference to the project's Document object. For example, the code in a document's project can display the name of the project's document in a message box with this statement:

    MsgBox ThisDocument.Name

If your Visual Studio solution includes the Microsoft.Office.Interop.Visio reference, this object maps to the following types:

  • Microsoft.Office.Interop.Visio.IVDocument

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.