scripting:api:application:new-file-ex

NewFileEx

Method of IApplication

Creates a new file of specific type and returns reference to it

  • BSTR strDocumentType
  • BSTR strPath = "" (optional)
  • VARIANT vContent (optional)
var ppDocument = Application.NewFileEx(strDocumentType, strPath, vContent);

==== Visual Basic Script ====

ppDocument = Application.NewFileEx strDocumentType, strPath, vContent

==== C++ ====

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

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