TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

WrapInMailMergeField

WrapInMailMergeField()

Wraps the paragraph content in a mail merge field.

Parameters:

This method doesn't have any parameters.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("Paragraph wrapped in 'Mail Merge Field'");
oParagraph.WrapInMailMergeField();
builder.SaveFile("docx", "WrapInMailMergeField.docx");
builder.CloseFile();

Resulting document