CommandLine property
Determines how Microsoft Visio was started.
Version added
2000
Syntax
| |
strRet |
String. The command line with which the application was started. |
object |
Required. An expression that returns an Application object. |
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 start the application using a CreateObject call, "/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 |
Choose Drawing Type dialog box is not shown on startup. |
/nologo |
Splash screen is not shown on startup. |
/p filename |
Print dialog box is shown so you can quickly print a file. |
filename |
Opens a Visio file. The file has to be in the Drawings file path on the File Paths tab in the Options dialog box (on the Tools menu, click Options), or an absolute path must be named. |
/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 file to print on a particular printer. (Added in Visio version 5.0c.) |
::ODMA |
Visio opens a file using ODMA. |