I have a MS Word template that has the following logic:
{ SET BOOKMARK { MERGESEQ }}
Value of BOOKMARK: { REF BOOKMARK}
Value of MERGESEQ: { MERGESEQ }
When I run the merge through MS Word, I get the “value of” BOOKMARK and MERGESEQ to be the counter of the records, as I would expect. However, we I run this through Aspose.Words I get don’t get a value for the book mark. Here is a snippet of the code that I am running:
Dim doc As New Document(wordTemplate)
doc.MailMerge.Execute(dt)
FieldsHelper.ConvertFieldsToStaticText(doc, Fields.FieldType.FieldMergeSeq)
FieldsHelper.ConvertFieldsToStaticText(doc, Fields.FieldType.FieldSet)
FieldsHelper.ConvertFieldsToStaticText(doc, Fields.FieldType.FieldRef)
doc.Save(stream, SaveFormat.Docx)
Thanks - Ken