Skip to main content

SetPropertyW

Sets an argument in the Unicode format which can be transferred to the program outside the CDocBuilder.ExecuteCommand method, i.e. either as an additional property when running ONLYOFFICE Document Builder executable file or as a part of program code, but not included into the document file script.

note

This method is only available for C++.

Syntax​

void SetPropertyW(const wchar_t* sParam, const wchar_t* sValue);

Parameters​

NameTypeDescription
sParamconst wchar_t*The parameter name in the Unicode format (see Supported properties).
sValueconst wchar_t*The parameter value in the Unicode format which will be used in the document.

Supported properties​

See SetProperty for the list of supported properties.

Example​

std::wstring sWorkDirectory = NSUtils::GetBuilderDirectory();
CDocBuilder::Initialize(sWorkDirectory.c_str());
CDocBuilder oBuilder;
oBuilder.SetPropertyW(L"--argument", L"{\"name\":\"ONLYOFFICE\"}");
CDocBuilder::Dispose();