Hi
Can you please help me out on this exception.
When I execute my code it gives ReportException & asks to report it to this forum.
When I use NewScrapbook.xml it doesn’t give this exception but when I use
VAN xml, it does.
I am attaching the code.
Please help.
Thanks
Bhoomica
Hi Bhoomica,
Thanks for your inquiry. The problem occurs because bookmark “Cover_HOS” is placed inside bookmark “Additional_Cover”. If you set text of Additional_Cover bookmark, the “Cover_HOS” bookmark is removed and no longer exists in the document. You should check whether bookmark exists in the document before setting text. Please try using the following code:
if (document.getRange().getBookmarks().get(bookmark.getName()) != null)
bookmark.setText("");
Hope this helps.
Best regards.