Inserting Bookmarks Dynamically

Dynamic insertion of bookmarks for Word Processing documents and emails with HTML and RTF bodies

You can insert bookmarks to your reports dynamically using bookmark tags. Syntax of a bookmark tag is defined as follows.

<<bookmark [bookmark_expression]>>

Here, bookmark_expression defines the name of a bookmark to be inserted during run-time. This expression is mandatory and must return a non-empty value. While building a report, bookmark_expression is evaluated and its result is used to construct a bookmark start and end that replace corresponding opening and closing bookmark tags respectively.

The following code snippet shows how simple you call the document assembler to generate report from the template:

Dynamic naming of cell ranges for Spreadsheet documents

Template syntax and usage of Document Assembler is same as above section for dynamic naming of cell ranges for Spreadsheet documents. The difference is that it results to insertion of named cell ranges instead of bookmarks.

Download Templates

© Aspose Pty Ltd 2001-2022. All Rights Reserved.