1 General

There are several ways to export a specific form is.

  • Without template: plain text only.
  • With Excel template: allows you to mutate and add data (formulas).
  • With Word template: this allows you to optimize formatting.
  • As a PDF based on Excel or Word template.

In this tutorial, we will discuss how to use a Word template.

Note that Word templates can only be used for form reports.

2 Methods

  • In Word, create a template.
  • In LeanForms under Manage, create a report template based on this Word template.
  • Link the report template to the form type.

2.1 Create a Word template

2.1.1 Preparation Word settings

To create placeholders in Word, the “Developer” option must be activated in the Word menu to use “ContentControls.”

If you don’t already have this option in your menu, you can add it by right-clicking in the empty area in Word’s toolbar and then selecting the option “Customize the Ribbon…” select. In the Dutch version of Word, this option is called “Customize the Ribbon.” You can also find the option through File > Options > Customize Ribbon.

Then in the right part of the screen, check the “Developer” option.

After this, you will see the “Developer” tab in the menu.

2.1.2 Setting up template

2 types of ContentControls can be used.

  • Plain Text
  • Picture

If you select the text or picture control, the “Properties” button in the toolbar on the Developer tab allows you to adjust the settings.

This allows linking to the questions in the LeanForms form.

Title: a text that serves as a reference for yourself.
Tag: ID of the question.

You can copy this from the “ID of question” field in the General properties of a question in LeanForms.

 

When exported, the pictures take the format of the picturecontrol.

Special tags

There are some special tags. You enter these under Tag.

  • code (form number).
  • title (name of form type).
  • link (link to the form). If text is filled at the “title” field in the Content Control Properties, the link is displayed with this (clickable) text.
QR codes and barcodes

It is possible to display the questions as a QR code or barcode. The following types of codes are supported. Note! Not all characters are supported by every type of code. If the value of the query does not meet the requirements of a code, it will be reflected in the Word export.

  1. QR code: all characters allowed.
  2. Code 39: only capital letters, numbers, space, period and the characters – $ / + % allowed.
  3. Code 128: all characters allowed.
  4. EAN13: only valid 13-digit EAN code with check digit allowed.

To display a question as a QR or barcode, the desired encoding must be added after the (special) tag.

  • |xxx: answer of the question. For a choice question (dropdown or radio button), display of the text of the selected option.
  • #xxx: Only for choice questions (dropdown or radio button), display the value of the selected option.

Here xxx stands for the desired bar code (QR, Code39, Code128, EAN13). For example:

  • q_215|QR: the answer to question (or text of chosen option in multiple choice question) with ID q_215 as QR code.
  • q_167#Code39: the value of the option selected at choice question with ID q_167 as Code 39.
  • link|QR: the link to the form as a QR code.

Matrix

For an array, you first create a table.

  • In the first row, specify the desired column headers (gray in example).
  • If you leave the first column blank, the line number is written away (orange in example).
  • In each cell, include the desired question IDs of the matrix questions (green in example).

Example matrix in Word table with line number in first column

Example matrix in Word table without line number in first column

Actions

Actions plotted in the form can also be included in the Word export. To do this, first create a table with 2 lines.

  • In the first row, enter the desired column headings.
  • In the second row, from column 1, you can add the special tags of the actions as text objects as you wish.
    • Question number: action.question
    • Plandatum: action.plandate
    • Initiator: action.initiator
    • Action holder: action.responsible
    • Description: action.description
    • Comments: action.remarks
    • Rounded to: action.finisheddate
    • Completed by: action.finishedby

Formatting

To customize the formatting of the ContentControl, a Style must be used. Go to the “Home” tab and expand the “Styles” block. Choose “Create a Style.”

  • In the popup, click “Modify.”
  • Under “Style type,” choose “Paragraph.”
  • Set the desired formatting and click “Ok.”
  • Select the ContentControl.
  • In the “Styles” block, click the newly created style.

2.2 Create Report Template

Create a report template in the usual way.

Go to Administration – Report templates tab – Add. Upload the created Word template here.

2.3 Link report template to form

  • Form properties – Form report – Export template: choose the appropriate report template here.
  • Tick:
    • Export to Excel/Word for an export to Word.
    • Export to PDF for an export to PDF based on the Word template.

Not quite getting there? Then contact us at 0161 – 778442 or info@leanforms.nl

Have you found a bug in the software or an idea for an improvement?

Let us know through the portal!

Intranet LeanForms