01-10-2025 10:54 AM
I am trying to use the Report Generation Toolkit to write to a MS Word document using bookmarks with a Word Template file. I cannot figure out why I am getting an error when the vi runs concerning being able to write to the report file.
01-10-2025 11:50 AM
I found a hint here:
There's a different scope to replace a bookmark inside a form field. I was able to make your example work by deleting the form field and adding a normal bookmark.
If you have to keep the form fields, there should be ActiveX calls to work with them, instead of using the Report Generation Toolkit.
01-10-2025 12:01 PM
Jeremy,
Thats great you got it to work but can you be more specific about how to delete the form field and adding a normal bookmark?
01-13-2025 08:34 AM
If you right click -> properties on the field you can see that the bookmark is assigned inside the field:
The problem is that the Report Generation Kit VIs can't access the bookmark inside the field -- it's in a different scope.
So first you can delete the form field to get rid of the embedded bookmark. (You could also clear the bookmark from the field by clearing the textbox shown above, but this leaves a useless field behind in the template.)
Re-add the bookmark with the same name at the same place by selecting Insert -> Bookmark:
01-13-2025 09:28 AM
Thank you! It works perfectly now.