Office Activities

The following activities let you handle specific actions in MS Word:

  • Fill Word Template
  • Word Update XML

Fill Word Template

This activity fills a special prepared Word document with data.

 OfficeWordTemplate01

After providing a template, fields can be loaded from the template and will automatically be filled into the columns of the table.

How to create a word template 

  • enable ‘Developer Tools’ in Word

  • add a form field of type ‘Rich Text Content Control’

  • enter the following text in the form field: <Content Select=“./MyFieldName“/>
    (compared to the screenshot above: Name, tb_Kunde_Straße, tb_Kunde_PLZ, …)

Parameters 

Name

Usage Description
Template document path Required File Path where the Template is, needs to be reachable from the server
Table Values

 

Consisting of WordTemplate field and the value with which it should be replaced.

As the activity gets the values passed as text and splits by “;”  ; is not supported in values

Output document path

Required

Directory where the Template is saved after replacing Values

Output document name templte

Required

Name of the generated Document

Supported Placeholders:

  • [%YYYY%] CurrentYear (e. g. 2020)

  • [%MM%] CurrentMonth (e. g. 02 for February)

  • [%TT%] CurrentDay (e. g. 09)

  • [%YMD%] CurrentDate (e. g. 2020_02_22)

  • [%HMS%] CurrentTime (e. g. 05_13_02)

  • [%DATE [+|-nnn,][U,]FORMAT %]

    • with +|-nnn as offset
      multiple values are possible, separated with ' ' each offset needs to end with one of the following offset specifiers

      • M: Months

      • Y|J: Years

      • W: Week

      • T: Days

    • U dateOption (e.g. +MO or -SA)

      • U, LOM: last day of month

      • FOM: first day of month

      • FOY: first day of year

      • LOY: last day of year

      • + next <WEEKDAY>

      • - previous <WEEKDAY>

      • with <WEEKDAY>

        • MO: Monday

        • DI, TU: Tuesday

        • MI, WE: Wednesday

        • DO, TH: Thursday

        • FR: Friday

        • SA: Saturday

        • SO, SU: Sunday

    • format

      • default DateTime FormatString C#

      • wwISO: Week of year (ISO 8601)

      • ww: Week of year

  • [%fieldPath%] replaced with the defined value with fieldpath being the same as appears in the column part of the table

Output Document Name

 

Name of the generated Document, including the path

 



Word Update XML

This activity updates a custom XML part in the input Word document passed as input via the input attachment field.

OfficeWordXML01