A repeat block is a fragment in the template document that will be repeated for each row in a data source. In the template document, repeat blocks are defined by Word bookmarks that contain merge fields. You can call SetRepeatBlock several times for a single instance of WordTemplate. The repeat block specified by the parameter bookmark must exist in the template. If you pass an empty DataTable to SetRepeatBlock - by either setting maxRows to 0 or passing an empty DataTable - WordWriter will not include the specified repeat block in the generated Word file. |