Fill table inside bookmark - ASP-VBScript

Hello,

We are converting an automated Word report to work with Aspose.Words.

This is for example what we are trying to do in our existing code:

oWordDoc.Bookmarks("bookmark").Range.Tables(1).Cell(1, 1).Range.InsertAfter "text"

I know the range of the bookmark should be referenced like this ‘oWordDoc.Range.Bookmarks.Item_2(“bookmark”)’, but how can we fill the table inside it?

Where can I find this in the documentation?

Thanks!

CMDevTeam

Hi
Thanks for your request. There is no direct method to get the table inside a bookmark. But if you put your bookmark inside the table, you will be able to get the parent table of the bookmark.
Also, if your main goal is to fill the document with data, I think, you can consider using Mail Merge feature:
https://docs.aspose.com/words/net/types-of-mail-merge-operations/
If you need to repeat rows in your table, you can use Mail Merge with regions.
Hope such way is acceptable for you.
Best regards,