Document Object [Visio 2003 SDK Documentation]
Multiple objects Document Multiple objects |
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.
Version added
2.0
Remarks
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.
Use the CustomMenus or CustomToolbars properties of a Document object to access the custom menus or toolbars.
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
Properties | AlternateNames property | AutoRecover property | BottomMargin property | BuildNumberCreated property | BuildNumberEdited property | Category property | ClassID property | Colors property | Company property | Container property | ContainsWorkspace property | CustomMenus property | CustomMenusFile property | CustomToolbars property | CustomToolbarsFile property | DefaultFillStyle property | DefaultGuideStyle property | DefaultLineStyle property | DefaultStyle property | DefaultTextStyle property | Description property | DocumentSheet property | DynamicGridEnabled property | EmailRoutingData property | EventList property | Fonts property | FooterCenter property | FooterLeft property | FooterMargin property | FooterRight property | FullBuildNumberCreated property | FullBuildNumberEdited property | FullName property | GestureFormatSheet property | GlueEnabled property | GlueSettings property | HeaderCenter property | HeaderFooterColor property | HeaderFooterFont property | HeaderLeft property | HeaderMargin property | HeaderRight property | HyperlinkBase property | ID property | Index property | InPlace property | Keywords property | Language property | LeftMargin property | MacrosEnabled property | Manager property | Masters property | MasterShortcuts property | Mode property | Name property | ObjectType property | OLEObjects property | Pages property | PaperHeight property | PaperSize property | PaperWidth property | Path property | PersistsEvents property | PreviewPicture property | PrintCenteredH property | PrintCenteredV property | Printer property | PrintFitOnPages property | PrintLandscape property | PrintPagesAcross property | PrintPagesDown property | PrintScale property | ProgID property | Protection property | ReadOnly property | RemovePersonalInformation property | RightMargin property | Saved property | SavePreviewMode property | SharedWorkspace property | SnapAngles property | SnapEnabled property | SnapExtensions property | SnapSettings property | SolutionXMLElement property | SolutionXMLElementCount property | SolutionXMLElementExists property | SolutionXMLElementName property | Stat property | Styles property | Subject property | Sync property | Template property | Time property | TimeCreated property | TimeEdited property | TimePrinted property | TimeSaved property | Title property | TopMargin property | Type property | UndoEnabled property | VBProject property | VBProjectData property | Version property | ZoomBehavior property
Methods | AddUndoUnit method | BeginUndoScope method | CanCheckIn method | CheckIn method | Clean method | ClearCustomMenus method | ClearCustomToolbars method | ClearGestureFormatSheet method | Close method | CopyPreviewPicture method | DeleteSolutionXMLElement method | Drop method | EndUndoScope method | ExecuteLine method | FollowHyperlink method | OpenStencilWindow method | ParseLine method | Print method | PrintOut method | PurgeUndo method | RenameCurrentScope method | Save method | SaveAs method | SaveAsEx method | SetCustomMenus method | SetCustomToolbars method
Events | BeforeDocumentClose event | BeforeDocumentSave event | BeforeDocumentSaveAs event | BeforeMasterDelete event | BeforePageDelete event | BeforeSelectionDelete event | BeforeShapeTextEdit event | BeforeStyleDelete event | ConvertToGroupCanceled event | DesignModeEntered event | DocumentChanged event | DocumentCloseCanceled event | DocumentCreated event | DocumentOpened event | DocumentSaved event | DocumentSavedAs event | MasterAdded event | MasterChanged event | MasterDeleteCanceled event | PageAdded event | PageChanged event | PageDeleteCanceled event | QueryCancelConvertToGroup event | QueryCancelDocumentClose event | QueryCancelMasterDelete event | QueryCancelPageDelete event | QueryCancelSelectionDelete event | QueryCancelStyleDelete event | QueryCancelUngroup event | RunModeEntered event | SelectionDeleteCanceled event | ShapeAdded event | ShapeExitedTextEdit event | ShapeParentChanged event | StyleAdded event | StyleChanged event | StyleDeleteCanceled event | UngroupCanceled event
Parent Objects | Application Object | Cell Object | Characters Collection | Color Object | Colors Collection | Connect Object | Connects Collection | Documents Collection | Font Object | Fonts Collection | Global Object | InvisibleApp Object | Layer Object | Layers Collection | Master Object | Masters Collection | MasterShortcut Object | MasterShortcuts Collection | Page Object | Pages Collection | Selection Object | Shape Object | Shapes Collection | Style Object | Styles Collection | Window Object
Child Objects | Colors Object | EventList Object | Fonts Object | Masters Object | MasterShortcuts Object | OLEObjects Object | Pages Object | Shape Object | Styles Object | UIObject Object
See Also | Documents collection