DoCmd Method [Visio 2003 SDK Documentation]
Performs the command that has the indicated command ID.
object**.DoCmd** (intExpression)
object Required. An expression that returns an Application object.
intExpression Required Integer. The command to perform.
Version added
4.0
Remarks
Constants for Microsoft Office Visio command IDs are declared by the Visio type library in VisUICmds and are prefixed with visCmd.
The DoCmd method works best with commands that display dialog boxes.
For a list of commands that can be used with the DoCmd method, see the topic DoCmd/DOCMD commands in this Automation Reference.
Example
The following macro shows how to use constants with the DoCmd method. It opens a new document and displays the document stencil.
Public Sub DoCmd_Example()
Dim vsoDocument As Visio.Document
Set vsoDocument = Documents.Add("")
Visio.Application.DoCmd (visCmdWindowShowMasterObjects)
End Sub
Applies to | Application object | InvisibleApp object