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.
Name | Type | Description |
name | BSTR | The name of the Document Builder method. |
val1-val6 | VARIANT | The parameters that the Document Builder method takes as arguments. |
result | I_DOCBUILDER_VALUE** | The returned method value. |
CoInitialize(NULL); IONLYOFFICEDocBuilder* oBuilder = NULL; IONLYOFFICEDocBuilderContext* oContext = NULL; IONLYOFFICEDocBuilderValue* oGlobal = NULL; IONLYOFFICEDocBuilderValue* oApi = NULL; IONLYOFFICEDocBuilderValue* oDocument = NULL; oBuilder->Initialize(); oBuilder->GetContext(&oContext); oContext->GetGlobal(&oGlobal); oGlobal->GetProperty(_bstr_t("Api"), &oApi); oApi->Call(_bstr_t("GetDocument"), ATL::CComVariant(), ATL::CComVariant(), ATL::CComVariant(), ATL::CComVariant(), ATL::CComVariant(), ATL::CComVariant(), &oDocument); oBuilder->Dispose();
var oDocument = Api.GetDocument();