Word resizing

When trying to resize tags in Word, Templater will choose the best possible range which includes all tags.
Templater has specialized handling for various Word features, such as:

  • tables
  • lists
  • sections
  • charts (embedded Excels)
  • headers/footers
  • footnotes/endnotes
  • images
  • content controls (bound and unbound)
  • embedded documents
  • watermarks, shapes, links, newlines ...

Resizing will behave differently depending on where the tags requested to be resized are located

  • when all tags are within same table, rows spanning all tags will be resized
  • if all tags are within list, levels within the list will be resized
  • for tags which are all within a chart, Excel resizing of the tags will be invoked, but the chart will not be duplicated
  • if all tags are within tables, lists and charts, resizing of those objects will be performed, but the object will not be duplicated
  • when tags are within a section(s), sections will be duplicated (and all objects within those sections will be duplicated)
  • for documents without sections, whole document will be duplicated
  • if all specified tags are within a single embedded document, rules of that document processing will apply

Since Templater will duplicate sections, which can contain tables, which can contain other tables, embedded documents, lists or charts, nesting can be arbitrary deep.
When tags are repeated in different tables resizing can enter into a special sharing mode, in which case both elements will be duplicated in the same way.

If same tag is repeated multiple times within a context (table, list, chart, ...), both will be included in the resize context.

Builtin special metadata - fixed - can be used to replace rows in a table, without invoking resize.
The remaining tags will be removed/replace with empty text

Special case of resizing is resizing to 0 = removing context.
Objects will be removed when resize(tags, 0) is called. The only exception is removing of whole document.
This is often useful to conditionally display parts of the documents and thus can be used to create complex layouts.

During resize, row/cell styles will be maintained. This means that row height should be preserved, along with cell formattings.

When footnotes and endnotes are used in resize, they are considered part of the context where they are referenced.
This means that table with a footnote which gets resized will duplicate the footnote (and footnote can contain tags which will behave as if they are within the table row)

Templater also supports bound XML documents, in which case it will also replace/resize the embedded XML document which is referenced from the context.

Template: Cells with custom styles and cell merging
Tags with merge cells and custom styles


Result screenshot:
Tags with merge cells and custom styles



Back to Features