RUNADDONWARGS function

Microsoft Office ShapeSheet

RUNADDONWARGS function

Runs filename and passes the command line arguments to the program as a string.

Syntax

RUNADDONWARGS("filename","arguments")

Remarks

In practice, arguments should be 50 characters or fewer. Use the RUNADDONWARGS function to bind a program, such as an add-on, to an Action cell.

In earlier versions of Microsoft Visio, this function appears as _RUNADDONWARGS. Visio application versions 4.0 and later accept either style.

Note VBA code invoked as a result of the Visio instance evaluating a RUNADDONWARGS function in a formula should not close the document containing the cell using the function because an application error results and Visio terminates.

If you need to close the document containing the cell that uses the RUNADDONWARGS function, use one of the following techniques:

  • Close the document from non-VBA code.
  • Close the document from a project other than the one that is closing.
  • Post window messages to close windows into the document rather than closing the document.

Example

RUNADDONWARGS("GRAPHMKR.EXE","/GraphMaker=Stack")

Launches the add-on Graphmkr.exe and passes it the argument /GraphMaker=Stack.