Table of contents
Collapse the table of content
Expand the table of content

Application.CommandLine Property (Visio)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Determines how Microsoft Visio was started. Read-only.


expression . CommandLine

expression A variable that represents an Application object.

Return Value



When you double-click a drawing, template, or stencil icon to start the application, the name of the file appears in the string returned by the CommandLine property. When you use a CreateObject call to start the application, "/Automation" appears in the string. When you double-click a Visio embedded object in an OLE container application, "/Embedding" appears in the string.

The following table includes other command line switches you can use to start the application.

** Command line switch**Description
/nonewThe New tab is not shown on startup.
/nologoThe startup screen is not shown on startup.
/p filenameThe Print dialog box is shown, so that you can quickly print a file.
filenameOpens a Visio file. Either the file has to be in the Drawings file path in the File Locations dialog box (click the File tab, click Options, click Advanced, and then, under General, click ** File Locations**), or you must name an absolute path.
/1, /2, /3,.../9Opens one of the last-opened files.
/noregPrevents Visio from registering itself.
/uUnregisters Visio.
/rRegisters Visio.
/sSilently registers Visio.
/pt filename,[printername, drivername, portname]Directs the file to print on a particular printer. (Added in Visio version 5.0c.)
::ODMAVisio uses ODMA to open a file.
© 2018 Microsoft