I would like to know can we delete certain section on a generated file? Say we would like to delete a table which contains a total of 0 user. The table normally will display, for example, total | 0. But I would like to delete this table. Or an image merge field which is a chart image (I’m generating chart images using Coldfusion), but because there is no data in the table (all data is 0), the image becomes blank. I’ve read something about using Bookmark in the template file but I don’t really get this one.
Thanks for the reply. I tried your suggestions but I’m still getting this error
Variable bk is undefined.
I’m building the app using Coldfusion. I know I might be asking in the wrong place, but is there any chance you can provide me the sample code using Coldfusion? This is the code I used in my application.
<cfset bk = loader.create(“com.aspose.words.Bookmark”)>
<cfset bk = report.getRange().getBookmarks().get(“bookmark_name”)>
<cfset table = loader.create(“com.aspose.words.Node”)>
<cfset table = bk.getBookmarkStart().getAncestor(NodeType.TABLE)>
All is good now. I’ve managed to solve the problem. Turned out, I don’t need to create the object bookmark and table. Thanks for your guide. It helped a lot.
Thanks for your details. It is great to hear that you managed to resolve. You are always welcome and please feel free to ask if you have any query in future.
We always welcome constructive response from our customers.