Application Object (Visio)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents an instance of Visio. An external program typically creates or retrieves an Application object before it can retrieve other Visio objects from that instance. Use the Microsoft Visual Basic CreateObject function or the New keyword to run a new instance, or use the GetObject function to retrieve an instance that is already running. You can also use the CreateObject function with the InvisibleApp object to run a new instance that is invisible. Set the value of the InvisibleApp object's Visible property to True to show it.

Use the Documents, Windows, and Addons properties of an Application object to retrieve the Document, Window, and Addon collections of the instance.

Use the ActiveDocument, ActivePage, or ActiveWindow property to retrieve the currently active Document, Page, or Window object.

Note Note

Starting with Visio, the Microsoft Office Fluent user interface (UI) replaces the previous system of layered menus, toolbars, and task panes. VBA objects and members that you used to customize the user interface in previous versions of Visio are still available in Visio, but they function differently.

Use the BuiltInMenus, BuiltInToolbars, CustomMenus, CustomToolbars, or CommandBars property to access the Application object's menus and toolbars.

ActiveDocument is the default property of an Application object.

Note Note

Code in the Microsoft Visual Basic for Applications project of a Visio document can use the Visio global object instead of a Visio Application object to retrieve other objects.

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

  • Microsoft.Office.Interop.Visio.ApplicationClass (to access the Application object.)

  • Microsoft.Office.Interop.Visio.ApplicationClass.Application (to construct the Application object.)

  • Microsoft.Office.Interop.Visio.EApplication_Event (to access events on the Application object.

Name

AfterModal

AfterRemoveHiddenInformation

AfterReplaceShapes

AfterResume

AfterResumeEvents

AppActivated

AppDeactivated

AppObjActivated

AppObjDeactivated

BeforeDataRecordsetDelete

BeforeDocumentClose

BeforeDocumentSave

BeforeDocumentSaveAs

BeforeMasterDelete

BeforeModal

BeforePageDelete

BeforeQuit

BeforeReplaceShapes

BeforeSelectionDelete

BeforeShapeDelete

BeforeShapeTextEdit

BeforeStyleDelete

BeforeSuspend

BeforeSuspendEvents

BeforeWindowClosed

BeforeWindowPageTurn

BeforeWindowSelDelete

CalloutRelationshipAdded

CalloutRelationshipDeleted

CellChanged

ConnectionsAdded

ConnectionsDeleted

ContainerRelationshipAdded

ContainerRelationshipDeleted

ConvertToGroupCanceled

DataRecordsetAdded

DataRecordsetChanged

DesignModeEntered

DocumentChanged

DocumentCloseCanceled

DocumentCreated

DocumentOpened

DocumentSaved

DocumentSavedAs

EnterScope

ExitScope

FormulaChanged

GroupCanceled

KeyDown

KeyPress

KeyUp

MarkerEvent

MasterAdded

MasterChanged

MasterDeleteCanceled

MouseDown

MouseMove

MouseUp

MustFlushScopeBeginning

MustFlushScopeEnded

NoEventsPending

OnKeystrokeMessageForAddon

PageAdded

PageChanged

PageDeleteCanceled

QueryCancelConvertToGroup

QueryCancelDocumentClose

QueryCancelGroup

QueryCancelMasterDelete

QueryCancelPageDelete

QueryCancelQuit

QueryCancelReplaceShapes

QueryCancelSelectionDelete

QueryCancelStyleDelete

QueryCancelSuspend

QueryCancelSuspendEvents

QueryCancelUngroup

QueryCancelWindowClose

QuitCanceled

ReplaceShapesCanceled

RuleSetValidated

RunModeEntered

SelectionAdded

SelectionChanged

SelectionDeleteCanceled

ShapeAdded

ShapeChanged

ShapeDataGraphicChanged

ShapeExitedTextEdit

ShapeLinkAdded

ShapeLinkDeleted

ShapeParentChanged

StyleAdded

StyleChanged

StyleDeleteCanceled

SuspendCanceled

SuspendEventsCanceled

TextChanged

UngroupCanceled

ViewChanged

VisioIsIdle

WindowActivated

WindowChanged

WindowCloseCanceled

WindowOpened

WindowTurnedToPage

Show: