OPENFILE Function

Opens a Microsoft Visio document, if it's not already open, and activates the document window.

Syntax

OPENFILE( "filename")

Parameters

Name Required/Optional Data Type Description
filename
Required
String
The name of the file, including file path, you want to open.

Remarks

Multiple OPENFILE function calls are queued and executed in order of evaluation. If the current Visio document is activated for visual (in-place) editing, a new Visio instance is launched with the requested file name.

This function always returns FALSE.

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

Example

OPENFILE("C:/MyFile.vsdx")

Opens the specified file "MyFile.vsdx" in a new window, or activates the window if the file is already open.