CreateFile
HRESULT CreateFile(type: [in] BSTR, result: [out, retval] VARIANT_BOOL*)
Description
Creates a new file. The type of the file which will be created needs to be set.
Parameters
- type
BSTR
- The file extension. The following values are possible:
docx
,xlsx
,pptx
, orpdf
(see OFFICESTUDIO_FILE_XXX values). - result
VARIANT_BOOL*
- Specifies if the operation of creating a file is successful or not.
Example
COM
CoInitialize(NULL);
IONLYOFFICEDocBuilder* oBuilder = NULL;
VARIANT_BOOL b;
oBuilder->Initialize();
oBuilder->CreateFile(_bstr_t("docx"), &b);
oBuilder->Dispose();
.docbuilder
builder.CreateFile("docx")