

The passed in function will return two arguments: the first (result) will be either either the Document reference or an Error. The document, if any, that is associated with the calling script can be passed along to help grant permission to open the new document. Note that due to platform sandboxing restrictions, opening the document may fail if the application doesn’t have currently permission to access the given file URL. If the document is already open, the reference to the open document is passed along.

This handler attempts to open the specified document and to return a reference to it asynchronously.

To open an OmniPlan file, a file URL is passed to the openDocument() application method.
#Omniplan tutorials how to#
The following documentation describes how open, create, save, and close documents, as well as how to access a document’s properties. Unlike other classes of objects, such as graphics, that can be addressed by index, the “current document” is simply referenced as document instead of app. For security reasons, scripts can only address the frontmost document, they cannot query for or address other documents that may be open. A Document is the top-level object in Omni Automation.
