DocumentBuilder.MoveToMergeField function don't find "TableStart:XXX"

Hi,


I use your demo file “ProductCatalogDemo.doc” in a VB project on Visual Studio 2010 on a french windows Server 2008 R2

The fields with “:” are not found :
?builder.MoveToMergeField(“TableStart:Categories”, True, False)
False
?builder.MoveToMergeField(“CategoryName”, True, False)
True

however the two fields are present in ProductCatalogDemo…

Whats is wrong ?

Thanks for answer

Gerald

Hi
Gerald,


Thanks for your inquiry.

In order to mark the beginning of a mail merge region, TableStart: is prefixed to the actual name of the Mergefield. The TableStart and TableEnd prefixes are used to just inform the Mail Merge engine of Aspose.Words about the beginning and ending of a mail merge region in your document.

In your case, to move the cursor to ‘Categories’ Mergefield, you can simply use the following line:

builder.MoveToMergeField(TableStart:Categories”);

I hope, this will help.

Best Regards,

Hi !


Many thanks ! its so simple… ;o)

But it will a good idee to change your sample “Producct Catalog”. My code was extracted from your demo file :

’ We want each category table to appear on a new page. This can be set up through page setup in the document
’ or through code as below
Dim builder As New DocumentBuilder(doc)
builder.MoveToMergeField(“TableEnd:Categories”, False, False)
builder.InsertBreak(BreakType.PageBreak)

Best regards,

Gerald
Hi

Thank you for pointing this out. We will correct this.

Best regards,