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
Aa342242.methods(en-us,office.12).gif AddUndoUnit Adds an object that supports the IOleUndoUnit or IVBUndoUnit interface to the Microsoft Office Visio undo queue.
Aa342242.methods(en-us,office.12).gif BeginUndoScope Starts a transaction with a unique scope ID for an instance of Microsoft Office Visio.
Aa342242.methods(en-us,office.12).gif CanCheckIn Specifies whether a document can be checked into a Microsoft SharePoint Portal Server computer.
Aa342242.methods(en-us,office.12).gif 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.
Aa342242.methods(en-us,office.12).gif CheckIn Returns a document from a local computer to a Microsoft SharePoint Portal Server computer.
Aa342242.methods(en-us,office.12).gif Clean Examines, reports, and repairs selected conditions in a document.
Aa342242.methods(en-us,office.12).gif ClearCustomMenus Restores the built-in Microsoft Office Visio menus.
Aa342242.methods(en-us,office.12).gif ClearCustomToolbars Restores the built-in Microsoft Visio toolbars.
Aa342242.methods(en-us,office.12).gif ClearGestureFormatSheet Clears local formatting in a document's Gesture Format sheet.
Aa342242.methods(en-us,office.12).gif Close Closes a document.
Aa342242.methods(en-us,office.12).gif CopyPreviewPicture Copies the preview picture from another document into the current document.
Aa342242.methods(en-us,office.12).gif DeleteSolutionXMLElement Deletes the named SolutionXML element.
Aa342242.methods(en-us,office.12).gif 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.
Aa342242.methods(en-us,office.12).gif EndUndoScope Ends or cancels a transaction that has a unique scope.
Aa342242.methods(en-us,office.12).gif ExecuteLine Executes a line of Microsoft Visual Basic code.
Aa342242.methods(en-us,office.12).gif ExportAsFixedFormat Exports a Microsoft Office Visio document as a file in a fixed format, either PDF or XPS.
Aa342242.methods(en-us,office.12).gif FollowHyperlink Navigates to an arbitrary hyperlink.
Aa342242.methods(en-us,office.12).gif GetThemeNames Returns a locale-specific array of names of themes contained in the document.
Aa342242.methods(en-us,office.12).gif GetThemeNamesU Returns a locale-independent array of names of themes contained in the document.
Aa342242.methods(en-us,office.12).gif OpenStencilWindow Opens a stencil window that shows the masters in the document.
Aa342242.methods(en-us,office.12).gif ParseLine Parses a line of Microsoft Visual Basic code.
Aa342242.methods(en-us,office.12).gif Print Prints the contents of an object to the default printer.
Aa342242.methods(en-us,office.12).gif PrintOut Prints the contents of the active document and provides various printing options.
Aa342242.methods(en-us,office.12).gif PurgeUndo Empties the Microsoft Office Visio queue of undo actions.
Aa342242.methods(en-us,office.12).gif RemoveHiddenInformation Removes hidden information, such as personal information and external data, from a Microsoft Office Visio document.
Aa342242.methods(en-us,office.12).gif RenameCurrentScope Renames the top-level open undo scope.
Aa342242.methods(en-us,office.12).gif Save Saves a document.
Aa342242.methods(en-us,office.12).gif SaveAs Saves a document and gives it a file name.
Aa342242.methods(en-us,office.12).gif SaveAsEx Saves a document with a file name using extra information passed in an argument.
Aa342242.methods(en-us,office.12).gif SetCustomMenus Replaces the current built-in or custom menus of an application or document.
Aa342242.methods(en-us,office.12).gif SetCustomToolbars Replaces the current built-in or custom toolbars of an application or document.
Aa342242.methods(en-us,office.12).gif 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
Aa342242.properties(en-us,office.12).gif AlternateNames Gets or sets the alternate names for a document. Read/write.
Aa342242.properties(en-us,office.12).gif Application Read-only. Returns the instance of Microsoft Office Visio that is associated with an object.
Aa342242.properties(en-us,office.12).gif AutoRecover Determines whether an open document that has unsaved changes is copied when automatic recovery is enabled. Read/write.
Aa342242.properties(en-us,office.12).gif BottomMargin Specifies the bottom margin when printing the pages in a document. Read/write.
Aa342242.properties(en-us,office.12).gif BuildNumberCreated Returns the build number of the instance used to create the document. Read-only.
Aa342242.properties(en-us,office.12).gif BuildNumberEdited Returns the build number of the instance last used to edit the document. Read-only.
Aa342242.properties(en-us,office.12).gif Category Gets or sets the value of a document's category, one of the document properties. Read/write.
Aa342242.properties(en-us,office.12).gif ClassID Returns the class ID string of the container application in which the document is embedded. Read-only.
Aa342242.properties(en-us,office.12).gif Colors Returns the Colors collection of a Document object. Read-only.
Aa342242.properties(en-us,office.12).gif Company Gets or sets the name of the company the document belongs to--one of the document's properties. Read/write.
Aa342242.properties(en-us,office.12).gif 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.
Aa342242.properties(en-us,office.12).gif ContainsWorkspaceEx Gets or sets whether workspace information is saved with the document. Read/write.
Aa342242.properties(en-us,office.12).gif Creator Gets or sets the value of a document's author—one of the document's properties. Read/write.
Aa342242.properties(en-us,office.12).gif CustomMenus Gets a UIObject object that represents the current custom menus and accelerators of an Application object or a Document object. Read-only.
Aa342242.properties(en-us,office.12).gif 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.
Aa342242.properties(en-us,office.12).gif CustomToolbars Gets a UIObject object that represents the current custom toolbars and status bars of an Application object or a Document object. Read-only.
Aa342242.properties(en-us,office.12).gif 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.
Aa342242.properties(en-us,office.12).gif DataRecordsets Returns the DataRecordsets collection contained in the document. Read-only.
Aa342242.properties(en-us,office.12).gif DefaultFillStyle Gets or sets the default fill style of a document. Read/write.
Aa342242.properties(en-us,office.12).gif DefaultGuideStyle Gets or sets the default guide style of a document. Read/write.
Aa342242.properties(en-us,office.12).gif DefaultLineStyle Gets or sets the default line style of a document. Read/write.
Aa342242.properties(en-us,office.12).gif DefaultSavePath Gets or sets the path to the location where Microsoft Office Visio saves the current document by default. Read/write.
Aa342242.properties(en-us,office.12).gif DefaultStyle Gets the default fill style of a document or sets the default fill, line, and text styles of a document. Read/write.
Aa342242.properties(en-us,office.12).gif DefaultTextStyle Gets or sets the default text style of a document. Read/write.
Aa342242.properties(en-us,office.12).gif Description Gets or sets the description of a document, one of a document's properties. Read/write.
Aa342242.properties(en-us,office.12).gif DocumentSheet Returns a Shape object whose cells represent properties of the document. Read-only.
Aa342242.properties(en-us,office.12).gif DynamicGridEnabled Determines whether the dynamic grid is enabled. Read/write.
Aa342242.properties(en-us,office.12).gif EmailRoutingData Returns e-mail routing data for a document. Read-only.
Aa342242.properties(en-us,office.12).gif EventList Returns the EventList collection of an object or the EventList collection that contains an Event object. Read-only.
Aa342242.properties(en-us,office.12).gif Fonts Returns the Fonts collection of a Document object. Read-only.
Aa342242.properties(en-us,office.12).gif FooterCenter Gets or sets the text string that appears in the center portion of a document's footer. Read/write.
Aa342242.properties(en-us,office.12).gif FooterLeft Gets or sets the text string that appears on the left side of a document's footer. Read/write.
Aa342242.properties(en-us,office.12).gif FooterMargin Gets or sets the margin of a document's footer. Read/write.
Aa342242.properties(en-us,office.12).gif FooterRight Gets or sets the text string that appears in the right portion of a document's footer. Read/write.
Aa342242.properties(en-us,office.12).gif FullBuildNumberCreated Returns the full build number of the instance used to create the document. Read-only.
Aa342242.properties(en-us,office.12).gif FullBuildNumberEdited Returns the full build number of the instance last used to edit the document. Read-only.
Aa342242.properties(en-us,office.12).gif FullName Returns the name of a document, including the drive and path. Read-only.
Aa342242.properties(en-us,office.12).gif 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.
Aa342242.properties(en-us,office.12).gif GlueEnabled Determines whether glue is enabled in the document. Read/write.
Aa342242.properties(en-us,office.12).gif GlueSettings Determines the objects that shapes glue to when glue is enabled in the document. Read/write.
Aa342242.properties(en-us,office.12).gif HeaderCenter Contains the text string that appears in the center portion of a document's header. Read/write.
Aa342242.properties(en-us,office.12).gif HeaderFooterColor Specifies the color of the header and footer text. Read/write.
Aa342242.properties(en-us,office.12).gif HeaderFooterFont Specifies the font used for the header and footer text. Read/write.
Aa342242.properties(en-us,office.12).gif HeaderLeft Gets or sets the text string that appears in the left portion of a document's header. Read/write.
Aa342242.properties(en-us,office.12).gif HeaderMargin Gets or sets the margin of a document's header. Read/write.
Aa342242.properties(en-us,office.12).gif HeaderRight Gets or sets the text string that appears in the right portion of a document's header. Read/write.
Aa342242.properties(en-us,office.12).gif HyperlinkBase Gets or sets the value of the Hyperlink base box in a document's Properties dialog box (File menu). Read/write.
Aa342242.properties(en-us,office.12).gif ID Gets the ID of an object. Read-only.
Aa342242.properties(en-us,office.12).gif Index Gets the ordinal position of a Document object in the Documents collection. Read-only.
Aa342242.properties(en-us,office.12).gif 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.
Aa342242.properties(en-us,office.12).gif Keywords Gets or sets the value of the Keywords box in a document's Properties dialog box. Read/write.
Aa342242.properties(en-us,office.12).gif Language Represents the language ID of the version of the Microsoft Office Visio instance represented by the parent object. Read/write.
Aa342242.properties(en-us,office.12).gif LeftMargin Specifies the left margin, which is used when printing. Read/write.
Aa342242.properties(en-us,office.12).gif MacrosEnabled Specifies whether you can execute macros and process events in a document's Microsoft Visual Basic for Applications (VBA) project. Read-only.
Aa342242.properties(en-us,office.12).gif Manager Gets or sets the value of the Manager box in a document's Properties dialog box. Read/write.
Aa342242.properties(en-us,office.12).gif Masters Returns the Masters collection for a document's stencil. Read-only.
Aa342242.properties(en-us,office.12).gif MasterShortcuts Returns the MasterShortcuts collection for a document stencil. Read-only.
Aa342242.properties(en-us,office.12).gif Mode Determines whether a document is in run mode or design mode. Read/write.
Aa342242.properties(en-us,office.12).gif Name Specifies the name of an object. Read-only.
Aa342242.properties(en-us,office.12).gif ObjectType Returns an object's type. Read-only.
Aa342242.properties(en-us,office.12).gif OLEObjects Returns the OLEObjects collection of a document. Read-only.
Aa342242.properties(en-us,office.12).gif Pages Returns the Pages collection for a document. Read-only.
Aa342242.properties(en-us,office.12).gif PaperHeight Returns the height of a document's printed page. Read-only.
Aa342242.properties(en-us,office.12).gif PaperSize Gets or sets the paper size of a document. Read/write.
Aa342242.properties(en-us,office.12).gif PaperWidth Returns the width of a document's printed page. Read-only.
Aa342242.properties(en-us,office.12).gif Path Returns the drive and folder path of the Microsoft Office Visio document. Read-only.
Aa342242.properties(en-us,office.12).gif PersistsEvents Indicates whether an object is capable of containing persistent events in its EventList collection. Read-only.
Aa342242.properties(en-us,office.12).gif PreviewPicture Gets or sets the preview picture shown in the Open dialog box or the Getting Started pane. Read/write.
Aa342242.properties(en-us,office.12).gif PrintCenteredH Indicates whether drawings are centered between the left and right edges of the paper when printed. Read/write.
Aa342242.properties(en-us,office.12).gif PrintCenteredV Indicates whether drawings are centered between the top and bottom edges of the paper when printed. Read/write.
Aa342242.properties(en-us,office.12).gif Printer Specifies the name of the printer to use when printing the document. Read/write.
Aa342242.properties(en-us,office.12).gif PrintFitOnPages Indicates whether drawings in a document are printed on a specified number of sheets across and down. Read/write.
Aa342242.properties(en-us,office.12).gif PrintLandscape Indicates whether a document's drawings are printed in landscape or portrait orientation. Read/write.
Aa342242.properties(en-us,office.12).gif PrintPagesAcross Indicates the number of sheets of paper on which a drawing is printed horizontally. Read/write.
Aa342242.properties(en-us,office.12).gif PrintPagesDown Gets or sets the number of sheets of paper on which a drawing is printed vertically. Read/write.
Aa342242.properties(en-us,office.12).gif PrintScale Gets or sets how much drawings are reduced or enlarged when printed. Read/write.
Aa342242.properties(en-us,office.12).gif ProgID Returns the programmatic identifier of a shape that represents an ActiveX control, an embedded object, or linked object. Read-only.
Aa342242.properties(en-us,office.12).gif Protection Determines how a document is protected from user customization. Read/write.
Aa342242.properties(en-us,office.12).gif ReadOnly Indicates whether a file is open as read-only. Read-only.
Aa342242.properties(en-us,office.12).gif RemovePersonalInformation Determines if personal information about a file is saved when the user saves the file in Microsoft Office Visio. Read/write.
Aa342242.properties(en-us,office.12).gif RightMargin Specifies the right margin, which is used when printing. Read/write.
Aa342242.properties(en-us,office.12).gif Saved Determines whether a document has any unsaved changes. Read/write.
Aa342242.properties(en-us,office.12).gif SavePreviewMode Determines whether and how a preview picture is saved in a file. Read/write.
Aa342242.properties(en-us,office.12).gif SharedWorkspace Returns a Microsoft Office SharedWorkspace object that provides access to the Office Document Workspace object model. Read-only.
Aa342242.properties(en-us,office.12).gif SnapAngles Determines the degree of the angle that is drawn when isometric angle lines is chosen as a shape extension option. Read/write.
Aa342242.properties(en-us,office.12).gif SnapEnabled Determines whether snap is active in the document. Read/write.
Aa342242.properties(en-us,office.12).gif SnapExtensions Determines the shape extensions that are active in a document. Read/write.
Aa342242.properties(en-us,office.12).gif SnapSettings Determines the objects that shapes snap to when snap is active in the document. Read/write.
Aa342242.properties(en-us,office.12).gif SolutionXMLElement Contains solution-specific, well-formed XML data stored with a document. Read/write.
Aa342242.properties(en-us,office.12).gif SolutionXMLElementCount Returns the number of SolutionXML elements in a document.Read-only
Aa342242.properties(en-us,office.12).gif SolutionXMLElementExists Indicates whether a named SolutionXML element exists in the document. Read-only.
Aa342242.properties(en-us,office.12).gif SolutionXMLElementName Returns the name of the SolutionXML element. Read-only.
Aa342242.properties(en-us,office.12).gif Stat Returns status information for an object. Read-only.
Aa342242.properties(en-us,office.12).gif Styles Returns the Styles collection for a document. Read-only.
Aa342242.properties(en-us,office.12).gif Subject Gets or sets the value of the Subject field in a document's properties. Read/write.
Aa342242.properties(en-us,office.12).gif 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.
Aa342242.properties(en-us,office.12).gif Template Returns the name of the template from which the document was created. Read-only.
Aa342242.properties(en-us,office.12).gif Time Returns the most recently recorded date and time. Read-only.
Aa342242.properties(en-us,office.12).gif TimeCreated Returns the date and time the document was created. Read-only.
Aa342242.properties(en-us,office.12).gif TimeEdited Returns the date and time the document was last edited. Read-only.
Aa342242.properties(en-us,office.12).gif TimePrinted Returns the date and time the document was last printed. Read-only.
Aa342242.properties(en-us,office.12).gif TimeSaved Returns the date and time the document was last saved. Read-only.
Aa342242.properties(en-us,office.12).gif Title Gets or sets the value of the Title field in a document's properties. Read/write.
Aa342242.properties(en-us,office.12).gif TopMargin Specifies the top margin when printing a document. Read/write.
Aa342242.properties(en-us,office.12).gif Type Returns the type of the object. Read-only.
Aa342242.properties(en-us,office.12).gif UndoEnabled Determines whether undo information is maintained in memory. Read/write.
Aa342242.properties(en-us,office.12).gif VBProject Returns a programmable object that you can use to control the Microsoft Visual Basic for Applications (VBA) project of the document. Read-only.
Aa342242.properties(en-us,office.12).gif VBProjectData Returns the Microsoft Visual Basic project data stored with a document. Read-only.
Aa342242.properties(en-us,office.12).gif Version Determines the version of a saved document. Read/write.
Aa342242.properties(en-us,office.12).gif ZoomBehavior Determines the zoom behavior for a Microsoft Office Visio document or window. Read/write.

Events

  Name Description
Aa342242.events(en-us,office.12).gif AfterRemoveHiddenInformation Occurs when hidden information is removed from the document.
Aa342242.events(en-us,office.12).gif BeforeDataRecordsetDelete Occurs before a DataRecordset object is deleted from the DataRecordsets collection.
Aa342242.events(en-us,office.12).gif BeforeDocumentClose Occurs before a document is closed.
Aa342242.events(en-us,office.12).gif BeforeDocumentSave Occurs before a document is saved.
Aa342242.events(en-us,office.12).gif BeforeDocumentSaveAs Occurs just before a document is saved by using the Save As command.
Aa342242.events(en-us,office.12).gif BeforeMasterDelete Occurs before a master is deleted from a document.
Aa342242.events(en-us,office.12).gif BeforePageDelete Occurs before a page is deleted.
Aa342242.events(en-us,office.12).gif BeforeSelectionDelete Occurs before selected objects are deleted.
Aa342242.events(en-us,office.12).gif BeforeShapeTextEdit Occurs before a shape is opened for text editing in the user interface.
Aa342242.events(en-us,office.12).gif BeforeStyleDelete Occurs before a style is deleted.
Aa342242.events(en-us,office.12).gif ConvertToGroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelConvertToGroup event.
Aa342242.events(en-us,office.12).gif DataRecordsetAdded Occurs when a DataRecordset object is added to a DataRecordsets collection.
Aa342242.events(en-us,office.12).gif DesignModeEntered Occurs before a document enters design mode.
Aa342242.events(en-us,office.12).gif DocumentChanged Occurs after certain properties of a document are changed.
Aa342242.events(en-us,office.12).gif DocumentCloseCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelDocumentClose event.
Aa342242.events(en-us,office.12).gif DocumentCreated Occurs after a document is created.
Aa342242.events(en-us,office.12).gif DocumentOpened Occurs after a document is opened.
Aa342242.events(en-us,office.12).gif DocumentSaved Occurs after a document is saved.
Aa342242.events(en-us,office.12).gif DocumentSavedAs Occurs after a document is saved by using the Save As command.
Aa342242.events(en-us,office.12).gif GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
Aa342242.events(en-us,office.12).gif MasterAdded Occurs after a new master is added to a document.
Aa342242.events(en-us,office.12).gif MasterChanged Occurs after properties of a master are changed and propagated to its instances.
Aa342242.events(en-us,office.12).gif MasterDeleteCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelMasterDelete event.
Aa342242.events(en-us,office.12).gif PageAdded Occurs after a new page is added to a document.
Aa342242.events(en-us,office.12).gif PageChanged Occurs after the name of a page, the background page associated with a page, or the page type (foreground or background) changes.
Aa342242.events(en-us,office.12).gif PageDeleteCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelPageDelete event.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif RunModeEntered Occurs after a document enters run mode.
Aa342242.events(en-us,office.12).gif SelectionDeleteCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelSelectionDelete event.
Aa342242.events(en-us,office.12).gif ShapeAdded Occurs after one or more shapes are added to a document.
Aa342242.events(en-us,office.12).gif ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
Aa342242.events(en-us,office.12).gif ShapeExitedTextEdit Occurs after a shape is no longer open for interactive text editing.
Aa342242.events(en-us,office.12).gif ShapeParentChanged Occurs after shapes are grouped or a group is ungrouped.
Aa342242.events(en-us,office.12).gif StyleAdded Occurs after a new style is added to a document.
Aa342242.events(en-us,office.12).gif 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.
Aa342242.events(en-us,office.12).gif StyleDeleteCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelStyleDelete event.
Aa342242.events(en-us,office.12).gif UngroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelUngroup event.