Goodmorning,
Please could you advice?
We have been trying to create a MS-Word document containing mailmerge fields. We have been using the code below.
Aspose.Words.Document doc = new Aspose.Words.Document();
Aspose.Words.DocumentBuilder bld = new Aspose.Words.DocumentBuilder(doc);
bld.Writeln("my document, par 1");
bld.Write("Name: ");
bld.InsertField(@"MERGEFIELD Name \* MERGEFORMAT", "John Doe");
bld.Writeln("");
bld.Write("Address: ");
bld.InsertField(@"MERGEFIELD Address \* MERGEFORMAT", "Street 1");
bld.Writeln("");
bld.Writeln("my document, par 2");
bld.Writeln("greetings,");
doc.Save(@"c:\temp\letter.doc");
Now we wish to achieve that when we open the document with MS-Word the fields will be shown in the “Insert Merge Field” dropdown. Which is default when one creates a mailmerge document in MS-Word.
Is there a way to accomplish this? It’s pretty important to us. In plain English, we wish to create a MS-Word document where we can select mailmerge fields from the “Insert Mailmerge Field” dropdown.
Kind regards,
Jan Stolk
The Netherlands.