Document Object Members
Visio Automation Reference |
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 Office Visio. A Document object is a member of the Documents collection of an Application object.
Methods
Name | Description | |
---|---|---|
![]() |
AddUndoUnit | Adds an object that supports the IOleUndoUnit or IVBUndoUnit interface to the Microsoft Office Visio undo queue. |
![]() |
BeginUndoScope | Starts a transaction with a unique scope ID for an instance of Microsoft Office Visio. |
![]() |
CanCheckIn | Specifies whether a document can be checked into a Microsoft SharePoint Portal Server computer. |
![]() |
CanUndoCheckOut | Determines whether a Microsoft Office Visio document is checked out from a Microsoft Office SharePoint Portal Server site, so that if it is, the check-out can be subsequently undone. |
![]() |
CheckIn | Returns a document from a local computer to a Microsoft SharePoint Portal Server computer. |
![]() |
Clean | Examines, reports, and repairs selected conditions in a document. |
![]() |
ClearCustomMenus | Restores the built-in Microsoft Office Visio menus. |
![]() |
ClearCustomToolbars | Restores the built-in Microsoft Visio toolbars. |
![]() |
ClearGestureFormatSheet | Clears local formatting in a document's Gesture Format sheet. |
![]() |
Close | Closes a document. |
![]() |
CopyPreviewPicture | Copies the preview picture from another document into the current document. |
![]() |
DeleteSolutionXMLElement | Deletes the named SolutionXML element. |
![]() |
Drop | Creates a new Master object by dropping an object onto a receiving object such as a stencil or document, or the Masters or MasterShortcuts collection. |
![]() |
EndUndoScope | Ends or cancels a transaction that has a unique scope. |
![]() |
ExecuteLine | Executes a line of Microsoft Visual Basic code. |
![]() |
ExportAsFixedFormat | Exports a Microsoft Office Visio document as a file in a fixed format, either PDF or XPS. |
![]() |
FollowHyperlink | Navigates to an arbitrary hyperlink. |
![]() |
GetThemeNames | Returns a locale-specific array of names of themes contained in the document. |
![]() |
GetThemeNamesU | Returns a locale-independent array of names of themes contained in the document. |
![]() |
OpenStencilWindow | Opens a stencil window that shows the masters in the document. |
![]() |
ParseLine | Parses a line of Microsoft Visual Basic code. |
![]() |
Prints the contents of an object to the default printer. | |
![]() |
PrintOut | Prints the contents of the active document and provides various printing options. |
![]() |
PurgeUndo | Empties the Microsoft Office Visio queue of undo actions. |
![]() |
RemoveHiddenInformation | Removes hidden information, such as personal information and external data, from a Microsoft Office Visio document. |
![]() |
RenameCurrentScope | Renames the top-level open undo scope. |
![]() |
Save | Saves a document. |
![]() |
SaveAs | Saves a document and gives it a file name. |
![]() |
SaveAsEx | Saves a document with a file name using extra information passed in an argument. |
![]() |
SetCustomMenus | Replaces the current built-in or custom menus of an application or document. |
![]() |
SetCustomToolbars | Replaces the current built-in or custom toolbars of an application or document. |
![]() |
UndoCheckOut | Closes a Microsoft Office Visio document checked out from a Microsoft Office SharePoint Server site, deletes the local copy of the document, discarding any changes, undoes the checkout, and then reopens the document. |
Properties
Name | Description | |
---|---|---|
![]() |
AlternateNames | Gets or sets the alternate names for a document. Read/write. |
![]() |
Application | Read-only. Returns the instance of Microsoft Office Visio that is associated with an object. |
![]() |
AutoRecover | Determines whether an open document that has unsaved changes is copied when automatic recovery is enabled. Read/write. |
![]() |
BottomMargin | Specifies the bottom margin when printing the pages in a document. Read/write. |
![]() |
BuildNumberCreated | Returns the build number of the instance used to create the document. Read-only. |
![]() |
BuildNumberEdited | Returns the build number of the instance last used to edit the document. Read-only. |
![]() |
Category | Gets or sets the value of a document's category, one of the document properties. Read/write. |
![]() |
ClassID | Returns the class ID string of the container application in which the document is embedded. Read-only. |
![]() |
Colors | Returns the Colors collection of a Document object. Read-only. |
![]() |
Company | Gets or sets the name of the company the document belongs to--one of the document's properties. Read/write. |
![]() |
Container | Returns an IDispatch interface on the ActiveX container in which the document is contained or Nothing if the document is not in a container. Read-only. |
![]() |
ContainsWorkspaceEx | Gets or sets whether workspace information is saved with the document. Read/write. |
![]() |
Creator | Gets or sets the value of a document's author—one of the document's properties. Read/write. |
![]() |
CustomMenus | Gets a UIObject object that represents the current custom menus and accelerators of an Application object or a Document object. Read-only. |
![]() |
CustomMenusFile | Gets or sets the name of the file that defines custom menus and accelerators for an Application object or a Document object. Read/write. |
![]() |
CustomToolbars | Gets a UIObject object that represents the current custom toolbars and status bars of an Application object or a Document object. Read-only. |
![]() |
CustomToolbarsFile | Returns or sets the name of the file that defines custom toolbars and status bars for an Application object or a Document object. Read/write. |
![]() |
DataRecordsets | Returns the DataRecordsets collection contained in the document. Read-only. |
![]() |
DefaultFillStyle | Gets or sets the default fill style of a document. Read/write. |
![]() |
DefaultGuideStyle | Gets or sets the default guide style of a document. Read/write. |
![]() |
DefaultLineStyle | Gets or sets the default line style of a document. Read/write. |
![]() |
DefaultSavePath | Gets or sets the path to the location where Microsoft Office Visio saves the current document by default. Read/write. |
![]() |
DefaultStyle | Gets the default fill style of a document or sets the default fill, line, and text styles of a document. Read/write. |
![]() |
DefaultTextStyle | Gets or sets the default text style of a document. Read/write. |
![]() |
Description | Gets or sets the description of a document, one of a document's properties. Read/write. |
![]() |
DocumentSheet | Returns a Shape object whose cells represent properties of the document. Read-only. |
![]() |
DynamicGridEnabled | Determines whether the dynamic grid is enabled. Read/write. |
![]() |
EmailRoutingData | Returns e-mail routing data for a document. Read-only. |
![]() |
EventList | Returns the EventList collection of an object or the EventList collection that contains an Event object. Read-only. |
![]() |
Fonts | Returns the Fonts collection of a Document object. Read-only. |
![]() |
FooterCenter | Gets or sets the text string that appears in the center portion of a document's footer. Read/write. |
![]() |
FooterLeft | Gets or sets the text string that appears on the left side of a document's footer. Read/write. |
![]() |
FooterMargin | Gets or sets the margin of a document's footer. Read/write. |
![]() |
FooterRight | Gets or sets the text string that appears in the right portion of a document's footer. Read/write. |
![]() |
FullBuildNumberCreated | Returns the full build number of the instance used to create the document. Read-only. |
![]() |
FullBuildNumberEdited | Returns the full build number of the instance last used to edit the document. Read-only. |
![]() |
FullName | Returns the name of a document, including the drive and path. Read-only. |
![]() |
GestureFormatSheet | Returns a reference to a document's Gesture Format sheet, which contains the line, fill, and text formatting that is applied to shapes drawn on the page. Read-only. |
![]() |
GlueEnabled | Determines whether glue is enabled in the document. Read/write. |
![]() |
GlueSettings | Determines the objects that shapes glue to when glue is enabled in the document. Read/write. |
![]() |
HeaderCenter | Contains the text string that appears in the center portion of a document's header. Read/write. |
![]() |
HeaderFooterColor | Specifies the color of the header and footer text. Read/write. |
![]() |
HeaderFooterFont | Specifies the font used for the header and footer text. Read/write. |
![]() |
HeaderLeft | Gets or sets the text string that appears in the left portion of a document's header. Read/write. |
![]() |
HeaderMargin | Gets or sets the margin of a document's header. Read/write. |
![]() |
HeaderRight | Gets or sets the text string that appears in the right portion of a document's header. Read/write. |
![]() |
HyperlinkBase | Gets or sets the value of the Hyperlink base box in a document's Properties dialog box (File menu). Read/write. |
![]() |
ID | Gets the ID of an object. Read-only. |
![]() |
Index | Gets the ordinal position of a Document object in the Documents collection. Read-only. |
![]() |
InPlace | Specifies whether a document is open in place, or whether a document is being viewed through a window that is open in place. Read-only. |
![]() |
Keywords | Gets or sets the value of the Keywords box in a document's Properties dialog box. Read/write. |
![]() |
Language | Represents the language ID of the version of the Microsoft Office Visio instance represented by the parent object. Read/write. |
![]() |
LeftMargin | Specifies the left margin, which is used when printing. Read/write. |
![]() |
MacrosEnabled | Specifies whether you can execute macros and process events in a document's Microsoft Visual Basic for Applications (VBA) project. Read-only. |
![]() |
Manager | Gets or sets the value of the Manager box in a document's Properties dialog box. Read/write. |
![]() |
Masters | Returns the Masters collection for a document's stencil. Read-only. |
![]() |
MasterShortcuts | Returns the MasterShortcuts collection for a document stencil. Read-only. |
![]() |
Mode | Determines whether a document is in run mode or design mode. Read/write. |
![]() |
Name | Specifies the name of an object. Read-only. |
![]() |
ObjectType | Returns an object's type. Read-only. |
![]() |
OLEObjects | Returns the OLEObjects collection of a document. Read-only. |
![]() |
Pages | Returns the Pages collection for a document. Read-only. |
![]() |
PaperHeight | Returns the height of a document's printed page. Read-only. |
![]() |
PaperSize | Gets or sets the paper size of a document. Read/write. |
![]() |
PaperWidth | Returns the width of a document's printed page. Read-only. |
![]() |
Path | Returns the drive and folder path of the Microsoft Office Visio document. Read-only. |
![]() |
PersistsEvents | Indicates whether an object is capable of containing persistent events in its EventList collection. Read-only. |
![]() |
PreviewPicture | Gets or sets the preview picture shown in the Open dialog box or the Getting Started pane. Read/write. |
![]() |
PrintCenteredH | Indicates whether drawings are centered between the left and right edges of the paper when printed. Read/write. |
![]() |
PrintCenteredV | Indicates whether drawings are centered between the top and bottom edges of the paper when printed. Read/write. |
![]() |
Printer | Specifies the name of the printer to use when printing the document. Read/write. |
![]() |
PrintFitOnPages | Indicates whether drawings in a document are printed on a specified number of sheets across and down. Read/write. |
![]() |
PrintLandscape | Indicates whether a document's drawings are printed in landscape or portrait orientation. Read/write. |
![]() |
PrintPagesAcross | Indicates the number of sheets of paper on which a drawing is printed horizontally. Read/write. |
![]() |
PrintPagesDown | Gets or sets the number of sheets of paper on which a drawing is printed vertically. Read/write. |
![]() |
PrintScale | Gets or sets how much drawings are reduced or enlarged when printed. Read/write. |
![]() |
ProgID | Returns the programmatic identifier of a shape that represents an ActiveX control, an embedded object, or linked object. Read-only. |
![]() |
Protection | Determines how a document is protected from user customization. Read/write. |
![]() |
ReadOnly | Indicates whether a file is open as read-only. Read-only. |
![]() |
RemovePersonalInformation | Determines if personal information about a file is saved when the user saves the file in Microsoft Office Visio. Read/write. |
![]() |
RightMargin | Specifies the right margin, which is used when printing. Read/write. |
![]() |
Saved | Determines whether a document has any unsaved changes. Read/write. |
![]() |
SavePreviewMode | Determines whether and how a preview picture is saved in a file. Read/write. |
![]() |
SharedWorkspace | Returns a Microsoft Office SharedWorkspace object that provides access to the Office Document Workspace object model. Read-only. |
![]() |
SnapAngles | Determines the degree of the angle that is drawn when isometric angle lines is chosen as a shape extension option. Read/write. |
![]() |
SnapEnabled | Determines whether snap is active in the document. Read/write. |
![]() |
SnapExtensions | Determines the shape extensions that are active in a document. Read/write. |
![]() |
SnapSettings | Determines the objects that shapes snap to when snap is active in the document. Read/write. |
![]() |
SolutionXMLElement | Contains solution-specific, well-formed XML data stored with a document. Read/write. |
![]() |
SolutionXMLElementCount | Returns the number of SolutionXML elements in a document.Read-only |
![]() |
SolutionXMLElementExists | Indicates whether a named SolutionXML element exists in the document. Read-only. |
![]() |
SolutionXMLElementName | Returns the name of the SolutionXML element. Read-only. |
![]() |
Stat | Returns status information for an object. Read-only. |
![]() |
Styles | Returns the Styles collection for a document. Read-only. |
![]() |
Subject | Gets or sets the value of the Subject field in a document's properties. Read/write. |
![]() |
Sync | Returns a Microsoft Office Sync object that provides information about the status of the active document in a shared workspace and the ability to perform a set of actions. Read-only. |
![]() |
Template | Returns the name of the template from which the document was created. Read-only. |
![]() |
Time | Returns the most recently recorded date and time. Read-only. |
![]() |
TimeCreated | Returns the date and time the document was created. Read-only. |
![]() |
TimeEdited | Returns the date and time the document was last edited. Read-only. |
![]() |
TimePrinted | Returns the date and time the document was last printed. Read-only. |
![]() |
TimeSaved | Returns the date and time the document was last saved. Read-only. |
![]() |
Title | Gets or sets the value of the Title field in a document's properties. Read/write. |
![]() |
TopMargin | Specifies the top margin when printing a document. Read/write. |
![]() |
Type | Returns the type of the object. Read-only. |
![]() |
UndoEnabled | Determines whether undo information is maintained in memory. Read/write. |
![]() |
VBProject | Returns a programmable object that you can use to control the Microsoft Visual Basic for Applications (VBA) project of the document. Read-only. |
![]() |
VBProjectData | Returns the Microsoft Visual Basic project data stored with a document. Read-only. |
![]() |
Version | Determines the version of a saved document. Read/write. |
![]() |
ZoomBehavior | Determines the zoom behavior for a Microsoft Office Visio document or window. Read/write. |
Events
Name | Description | |
---|---|---|
![]() |
AfterRemoveHiddenInformation | Occurs when hidden information is removed from the document. |
![]() |
BeforeDataRecordsetDelete | Occurs before a DataRecordset object is deleted from the DataRecordsets collection. |
![]() |
BeforeDocumentClose | Occurs before a document is closed. |
![]() |
BeforeDocumentSave | Occurs before a document is saved. |
![]() |
BeforeDocumentSaveAs | Occurs just before a document is saved by using the Save As command. |
![]() |
BeforeMasterDelete | Occurs before a master is deleted from a document. |
![]() |
BeforePageDelete | Occurs before a page is deleted. |
![]() |
BeforeSelectionDelete | Occurs before selected objects are deleted. |
![]() |
BeforeShapeTextEdit | Occurs before a shape is opened for text editing in the user interface. |
![]() |
BeforeStyleDelete | Occurs before a style is deleted. |
![]() |
ConvertToGroupCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelConvertToGroup event. |
![]() |
DataRecordsetAdded | Occurs when a DataRecordset object is added to a DataRecordsets collection. |
![]() |
DesignModeEntered | Occurs before a document enters design mode. |
![]() |
DocumentChanged | Occurs after certain properties of a document are changed. |
![]() |
DocumentCloseCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelDocumentClose event. |
![]() |
DocumentCreated | Occurs after a document is created. |
![]() |
DocumentOpened | Occurs after a document is opened. |
![]() |
DocumentSaved | Occurs after a document is saved. |
![]() |
DocumentSavedAs | Occurs after a document is saved by using the Save As command. |
![]() |
GroupCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event. |
![]() |
MasterAdded | Occurs after a new master is added to a document. |
![]() |
MasterChanged | Occurs after properties of a master are changed and propagated to its instances. |
![]() |
MasterDeleteCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelMasterDelete event. |
![]() |
PageAdded | Occurs after a new page is added to a document. |
![]() |
PageChanged | Occurs after the name of a page, the background page associated with a page, or the page type (foreground or background) changes. |
![]() |
PageDeleteCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelPageDelete event. |
![]() |
QueryCancelConvertToGroup | Occurs before the application converts a selection of shapes to a group in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
QueryCancelDocumentClose | Occurs before the application closes a document in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
QueryCancelGroup | Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
QueryCancelMasterDelete | Occurs before the application deletes a master in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
QueryCancelPageDelete | Occurs before the application deletes a page in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
QueryCancelSelectionDelete | Occurs before the application deletes a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
QueryCancelStyleDelete | Occurs before the application deletes a style in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
QueryCancelUngroup | Occurs before the application ungroups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled. |
![]() |
RunModeEntered | Occurs after a document enters run mode. |
![]() |
SelectionDeleteCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelSelectionDelete event. |
![]() |
ShapeAdded | Occurs after one or more shapes are added to a document. |
![]() |
ShapeDataGraphicChanged | Occurs after a data graphic is applied to or deleted from a shape. |
![]() |
ShapeExitedTextEdit | Occurs after a shape is no longer open for interactive text editing. |
![]() |
ShapeParentChanged | Occurs after shapes are grouped or a group is ungrouped. |
![]() |
StyleAdded | Occurs after a new style is added to a document. |
![]() |
StyleChanged | Occurs after the name of a style is changed or a change to the style propagates to objects to which the style is applied. |
![]() |
StyleDeleteCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelStyleDelete event. |
![]() |
UngroupCanceled | Occurs after an event handler has returned True (cancel) to a QueryCancelUngroup event. |