Forum


Replies: 1   Views: 121
Use a word template and replace table vars in multiple separate tables

Posted by GuntherG  · 17-07-2024 - 14:18

We've got our code working with a mix of replaceVariableByText or replaceVariableByHtml and whichever remains we put in a table date variable to create rows in tables from, and this works great but now i have word template where we have 3 separate tables, to illustrate its a transport table, time registration table and used material table,

The variables all get detected which is fantastic but when using replaceTableVariables, even with firstMatch false, it only adds rows and properly processes through the first table it finds.

Every other table on the docx with it's own variables (which did get detected and did get a replacement value supplied) gets ignored and we see the variables on the end result with its variablesymbols still around them...

 

Is there a way to achieve this?
I've combed through the documentation but can't find anything.

 

Thank you