File - Open

Opens, plays, prints or performs some other action on a file using the associated viewer on the user's system.

When you perform this action on a document, Windows will open the document using the document viewer associated with that file type. For example, if you open a file called ReadMe.txt, the text file will most likely be opened with Notepad, unless the user has associated a different text viewer with the .txt file type on their system.

This action takes advantage of the Windows shell. You probably use the Windows shell all the time without knowing it. For example, when you double-click on a folder, Windows performs a shell operation on the folder according to the instructions associated with the "open" verb for folders. If you right-click on a folder and select "explore", Windows performs the instructions associated with the "explore" verb, instead.

Action ID:
Action Category:
Action List Syntax:

7
File 
File.Open(<<FILENAME>>)

TIP

 

 

 

You can determine the associated viewer for any file type by using the "File - Get Information" action.

Settings

File to open:

The full path and file name of the file to open (e.g. %SrcDir%\My Docs\My Doc.txt).

Note: when using the Explore verb to open a folder, don't specify a filename—just specify the path to the folder itself (e.g. %SrcDir%\My Docs).

Verb:

The shell "verb" that tells the associated viewer what to do with the file. You can type your own verb, or choose from:

Open

-

Opens the file, just like it was double-clicked in Windows.

Print

-

Uses the associated viewer to print the file.

Explore

-

Opens the file/folder in Windows Explorer.

Play

-

Plays the file (for example, if it's a video or audio file).

Working directory:

The working directory to use when the file is opened.

Run mode:

The run mode that will be applied to the file when it is opened. The three available modes are:

Normal

-

The file will be opened to its normal window size.

Minimized

-

The file will be minimized upon launching.

Maximized

-

The file will be maximized upon launching.

Error Codes

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_FILE_NOT_FOUND
<<FILENAME>>

2

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_PATH_NOT_FOUND
<<FILENAME>>

3

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_INVALID_EXE
<<FILENAME>>

4

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_ACCESS_DENIED_OS
<<FILENAME>>

5

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_INCOMP_FILE_ASSOC
<<FILENAME>>

6

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_DDE_INUSE
<<FILENAME>>

7

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_DDE_FAILED
<<FILENAME>>

8

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_DDE_TIMEOUT
<<FILENAME>>

9

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_DLL_NOT_FOUND
<<FILENAME>>

10

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_NO_ASSOC
<<FILENAME>>

11

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_NO_MEMORY
<<FILENAME>>

12

MSG_ERR_OPENING_FILE

MSG_ERR_OPENING_FILE
MSG_ERR_SHARE_VIOLATION
<<FILENAME>>

 

Examples

Exploring a folder

Opening a folder

Opening a web page in the user's default browser