We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Single field within array-section

I have a question which I hope I will be able to explain.

We use Aspose to generate documents with mergefields. I don’t know exactly how this works, but we also support the option to insert arrays into the Word document. Therefore a section has to be created, in which the arrays can be merged into.

We now have the situation:
- A single mergefield first appears in the Word-document
- Then there is the array section, in which some arrays of mergefields are merged.
- But we also want to refer to the single field within the array section.

Is this possible?

Hi Joost,


Thanks for your inquiry. You can move cursor to any particular mergefield in document and write a single value into it as follows:

DocumentBuilder builder = new DocumentBuilder(doc);

builder.MoveToMergeField("mergefield name");

builder.Write("some value");


After that in case of array of values, you can perform mail merge operation as follows:

doc.MailMerge.Execute(new string[] { "mf1", "mf2", "mf3" },

new object[] { "val1", "val2", "val3" });


Hope, this helps.

Best regards,