SaveFile
HRESULT SaveFile(type: [in] BSTR, path: [in] BSTR, result: [out, retval] VARIANT_BOOL*)
Description
Saves the file after all the changes are made. The type of the file which will be saved needs to be set.
Parameters
- type
BSTR
- The file extension. The following values are possible:
docx
,odt
,rtf
,txt
,pptx
,xlsx
,ods
,csv
,pdf
(see OFFICESTUDIO_FILE_XXX values). - path
BSTR
- The path to the file to be saved together with its name and extension.
- result
VARIANT_BOOL*
- Specifies if the operation of saving a file is successful or not.
Example
COM
CoInitialize(NULL);
IONLYOFFICEDocBuilder* oBuilder = NULL;
VARIANT_BOOL b;
oBuilder->Initialize();
oBuilder->SaveFile("docx", "result.docx", &b);
oBuilder->Dispose();
.docbuilder
builder.SaveFile("docx", "result.docx")