CommandLine Property [Visio 2003 SDK Documentation]
Determines how Microsoft Office Visio was started.
strRet = object**.CommandLine**
strRet String. The command line with which the application was started.
object Required. An expression that returns an Application object.
Version added
2000
Remarks
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 |
---|---|
/nonew |
The Choose Drawing Type dialog box is not shown on startup. |
/nologo |
The startup screen is not shown on startup. |
/p filename |
The Print dialog box is shown so you can quickly print a file. |
filename |
Opens a Visio file. Either the file has to be in the Drawings file path in the File Paths dialog box (on the Tools menu, click Options, click the Advanced tab, and then click File Paths), or you must name an absolute path. |
/1, /2, /3,.../9 |
Opens one of the last-opened files. |
/noreg |
Prevents Visio from registering itself. |
/u |
Unregisters Visio. |
/r |
Registers Visio. |
/s |
Silently registers Visio. |
/pt filename,[printername, drivername, portname] |
Directs the file to print on a particular printer. (Added in Visio version 5.0c.) |
::ODMA |
Visio uses ODMA to open a file. |
Applies to | Application object | InvisibleApp object