Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for additional information.
1. There are no form fields in your document. These fields are called MergeFields.
2. You can add bullets during mail merge using MergeField event handler.
3. You can specify whether remove paragraphs that contained mail merge fields with no data using RemoveEmptyParagraphs property.
Please see the following code.
public void Test139()
{
//Open template document
Document doc = new Document(@"Test139\in.doc");
//Prepare data
string[] names = { "field40", "field42", "field44", "field46" };
string[] values = { "val1", "val2", "val3", "val4" };
//Add MergeField event handler
doc.MailMerge.MergeField += new MergeFieldEventHandler(MailMerge_MergeField139);
//Specifies whether paragraphs that contained mail merge fields with no data should be removed from the document.
doc.MailMerge.RemoveEmptyParagraphs = true;
//Execute mail merge
doc.MailMerge.Execute(names, values);
//Save document
doc.Save(@"Test139\out.doc");
}
void MailMerge_MergeField139(object sender, MergeFieldEventArgs e)
{
if (e.FieldName == "field40" || e.FieldName == "field42" || e.FieldName == "field44" || e.FieldName == "field46")
{
//Apply bullets
e.Field.Start.ParentParagraph.ListFormat.ApplyBulletDefault();
}
}
I hope this could help you.
Best regards.