Argument goes to the top

You want to copy data from the open document to the created document, but the path to the open document is not fixed, so you need to pass in the parameter

The code example is as follows:

var dataUrl = Argument["dataUrl"];
var oDocument = Api.GetDocument();
GlobalVariable["CommentsReport"] = oDocument.GetElement(0).GetText();

var oCommentsReport = GlobalVariable["CommentsReport"];

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("Data from DOC file: " + oCommentsReport);

builder.SaveFile("docx", "GetCommentsReport.docx");

Called through the docbuilder interface

    "async": false,
    "url": "",
    "argument": {
        "dataUrl": ""

After running, an error is reported:

    "key": "bld_f8e610a8d71f26e5",
    "urls": {},
    "end": true

Help with that. Thank you so much

Hello @css,
Unfortunately, at the moment builder.OpenFile and builder.CreateFile methods don’t support arguments. It will be fixed in one of the future versions. Sorry for the inconvenience.

How does generating documentation solve the problem of parameter passing? How to pass parameters with large amount of parameter data?

Arguments are supported by other Document Builder methods, only OpenFile and CreateFile don’t support them. I’m afraid we can’t offer any workaround.

What parameters are supported by other document builder methods? How to solve the data transfer to the document? Please reply as soon as possible. Thank you