OpenDocument Method

Action2 Example

 

Encapsulates the AutoMate™ action in the “General” group, “Open a document.” The method attempts to open the specified document using the document’s registered data and program type.

 

Declaration

function OpenDocument (varDocument As Variant) As Integer

 

Parameters

varDocument

 The full path to the document to be opened.

 

Description

The OpenDocument method attempts to open the document at the specified path using the file’s associated file type. For example, pointing to a file with a .txt extension will open the document using Notepad, and opening a website address will use Internet Explorer (on systems where IE is the default browser).

 

If the function fails, check to ensure the file you are pointing to has an associated file type.