Free Support Forum - aspose.com

ExecuteWithRegions method

If I use the ExecuteWithRegions method with a dataset from VB.Net, and it has multiple tables inside the dataset, can some of the field names (and corresponding merge fields) have the same name, as long as they are differentiated by being in a different region. This is of course on one Word doc.

Thank You,

Derek Hart

Hi

Thanks for your request. Yes, fields in different regions can have same names. For example see the following template.

«TableStart:table1»

«field1»

«field2»

«TableEnd:table1»

-------------------------------

«TableStart:table2»

«field1»

«field2»

«TableEnd:table2»

Best regards.

If I have a DataTable inside the DataSet, and it has 30 rows in it, but I want my Word Doc to only allow 10 rows in a table to be filled, and include a 2nd and 3rd copy of the document to fill the additional 10 rows into each table, does Aspose have any ability to support that process. I know I could store in a database information about how many rows that Word table will allow, and I could write code to deal with this, but does Aspoes have any support for this fairly common scenario?

Derek Hart

Also, if I merge with multiple regions, is it okay if my source datatable has more fields than my word doc?

Derek Hart

Hi

Thanks for your request.

  1. No, Aspose.Words doesn’t support for this feature. You should move this functionality into your SQL query or to the code.

  1. Yes, it is ok if your table has more fields than your word doc.

Best regards.