scripting:api:application:open-file

No renderer 'pdf' found for mode 'pdf'

OpenFile

Method of IApplication

Opens an existing file with or w/o file dialog and returns reference to it

  • BSTR strPath = "" (optional)
  • VARIANT_BOOL bInteractive = VARIANT_FALSE (optional)
  • VARIANT Syntax (optional)
  • long nEncoding = 0 (optional)
var ppDocument = Application.OpenFile(strPath, bInteractive, Syntax, nEncoding);
ppDocument = Application.OpenFile strPath, bInteractive, Syntax, nEncoding
CComPtr<ITextDocument> pDocument;
HRESULT hr = Application.OpenFile(strPath, bInteractive, Syntax, nEncoding, &pDocument);