scripting:api:application:open-file-ex

OpenFileEx

Method of IApplication

Opens an existing file with or w/o file dialog, using specific viewer (selected by document type) and returns reference to it

  • BSTR strDocumentType
  • BSTR strPath = "" (optional)
  • VARIANT_BOOL bInteractive = VARIANT_FALSE (optional)
var ppDocument = Application.OpenFileEx(strDocumentType, strPath, bInteractive);

==== Visual Basic Script ====

ppDocument = Application.OpenFileEx strDocumentType, strPath, bInteractive

==== C++ ====

CComPtr<IBaseDocument> pDocument;
HRESULT hr = Application.OpenFileEx(strDocumentType, strPath, bInteractive, &pDocument);

===== See Also ===== IApplication