====== OpenFileEx ======
Method of [[:scripting:api:application:start|IApplication]]
===== Description =====
Opens an existing file with or w/o file dialog, using specific viewer (selected by document type) and returns reference to it
===== Parameters =====
* [[scripting:api:data-type:BSTR|BSTR]] **strDocumentType**
* [[scripting:api:data-type:BSTR|BSTR]] **strPath** = %%""%% (optional)
* [[scripting:api:data-type:VARIANT_BOOL|VARIANT_BOOL]] **bInteractive** = VARIANT_FALSE (optional)
==== Return Value ====
* [[:scripting:api:base-document:start|IBaseDocument]] **ppDocument**
===== Syntax =====
==== JavaScript ====
var ppDocument = Application.OpenFileEx(strDocumentType, strPath, bInteractive);
==== Visual Basic Script ====
ppDocument = Application.OpenFileEx strDocumentType, strPath, bInteractive
==== C++ ====
CComPtr pDocument;
HRESULT hr = Application.OpenFileEx(strDocumentType, strPath, bInteractive, &pDocument);
===== See Also =====
[[:scripting:api:application:start|IApplication]]
~~NOTOC~~