1. Placeholders

PowerDoc uses placeholders in the Word template.

For editing Word templates use the Word Application installed on your device, don’t use Word Online (because Word Online doesn’t support placeholders in a correct way).

  • In Word open your template and go to tab “Developer”
  • On the “Controls” section there are some controls you can use, but only these are supported by PowerDoc:
    • Plain Text Content Control
    • Rich Text Content Control
    • Picture Content Control
    • Checkbox Content Control
    • Date Picker Content Control
    • Repeating Section Content Control

When inserting a content control set also a title in the properties of the Content Control. This title will be the placeholder name and should be the same as the placeholder name in the Flow template.

1.1 Plain Text Content Control

Use this content control for simple text values without styling.

1.2 Rich Text Content Control

Use this instead of the plain text control if you want to use a different font size, color, etc. or html or charts.

If you set extra style info in the PowerAutomate flow for the placeholder, prefix the title with style@, like: style@myvalue

1.2.1 Html

If you want to set some html (content from a rich text editor field), prefix the title with html@, like: html@myvalue

If you want to include a full html page (including styles), prefix the title with xhtml@, like: xhtml@myvalue

1.2.2 Word-document

If you want to insert the content of another docx document, prefix the title with docx@, like: docx@attachment

1.2.3 Chart

If you want to update a chart, place the chart into a Rich Text Control and prefix the title with chart@, like: chart@piechart1. Note that the chart data should have column names (all of them) which should be set in the Document flow with exact the same names.

1.3. Picture Content Control

1.3.1 Picture

Use the Picture Content Control for displaying a picture of png or jpg. You can manage the size and positioning. Keep in mind that the picture can be larger than the placeholder.

1.3.2 QR-code

If you want to render a value as QR-code as a picture based on a number or text, prefix the title with qrcode@, like: qrcode@websiteurl

1.4 Checkbox Content Control

1.5 Date Picker Content Control

To display a date in the correct format, set in the properties of the Date Picker the correct display format and locale (for example Dutch or English). For example, to display a date like “July 16, 2023” set the format as “MMMM d, yyyy”. Ensure that the passed date value from the flow is a valid date in ISO 8601-format like 2023-04-23T22:00:00.000Z

1.6 Repeating Section Content Control

For a simple list add a repeating section content control, give it a title (for example “mylist”) and inside this repeating section content control add other content control(s).

For a table, add a table with 2 rows (a header row and a data row). Select the full data row and add a repeating section content control, give it a title (for example “myproducts”). Inside this repeating section content control add other content control(s) in each cell.

Note: when setting the placeholders in a table cell inside a repeater, ensure that the table has an header row and at least 2 columns. Repeater will not work in a table with one row and/or 1 row.

2. Tips & Trics

  • If after concatenating documents page numbering goes wrong with the count of total pages, use the field NumPages instead of field SectionPages in your template.