Call

CDocBuilderValue Call(sName: const wchar_t* | const char*, p1: CDocBuilderValue, p2: CDocBuilderValue, p3: CDocBuilderValue, p4: CDocBuilderValue, p5: CDocBuilderValue, p6: CDocBuilderValue)

Description

Calls the specified Document Builder method. See the Text document API, Spreadsheet API, Presentation API or Form API sections for more information which methods are available for various document types.

Please note, that for the .docbuilder file the CDocBuilderValue.Call method is not used explicitly. The method itself is used instead. See the example below.

Parameters

sNameconst wchar_t* | const char*
The name of the Document Builder method in the Unicode or UTF8 format.
The parameters that the Document Builder method takes as arguments.

Example

C++

std::wstring sWorkDirectory = NSUtils::GetBuilderDirectory();
CDocBuilder::Initialize(sWorkDirectory.c_str());
CDocBuilder oBuilder;
CContext oContext = oBuilder.GetContext();
CValue oGlobal = oContext.GetGlobal();
CValue oApi = oGlobal["Api"];
CValue oDocument = oApi.Call("GetDocument");
CDocBuilder::Dispose();

.docbuilder

const oDocument = Api.GetDocument()

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).