We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Nesting data tables in the Word Document


We’re using Aspose.Words with the Microsoft .NET framework and want to achieve nested tables where a child table is filtered by a matched value on it’s parent, creating a relationship.

So an example of our data structure would be

- Group Id 1
– Item 1 with Group Id 1
– Item 2 with Group Id 1
- Group Id 2
– Item 3 with Group Id 2
– Item 4 with Group Id 2

The complication is that we are returning the two sets of data as seperate tables from our code, and are unable to set the relationship via code. We would like to try achieve this through Word at the document level (most likely using VBA or Mergefields) rather than in C# code.

We’ve taken a look at the documentation in the Aspose wiki pages and cannot find a solution that allows us to specify the relation through Word rather than in code.

Is this possible to achieve? If it is, how so?


Hi Chris,

Thanks for your inquiry. In your case, I suggest you please use the ‘Mail Merge with Regions’. Please read following documentation links for your kind reference. Hope this helps you.

Mail Merge with Regions Explained
How to Use Nested Mail Merge Regions
How to Execute Mail Merge with Regions
How to Set up Relations for use in Nested Mail Merge with Regions

If you still face problem, please share your input and expected output document here for our reference. We will then provide you more information about your query along with code.