theThought's thoughts

Kevin A Gray - Creative Strategy Guy

Building the Core Components - Data Collection Populates form using Custom Parts (the Word Doc)

The final component of this process is the Word document itself.  The construction of this document is in two parts:

1.       The layout

2.       The form fields

In previous posts I have created the survey that will capture the customer feedback (the survey) and I have devised the structure of the XML that makes up the custom part (the custom part). In this post I create the final piece of the puzzle before working on the automation of the process.

Step 1: the layout
As the document is basically a form I have used a basic table construct to create the layout, as shown in the following image..

Image001

Step 2: the form fields

The data displayed in the form will be sourced from the custom part.  Word provides a small number of form fields that can be bound to a custom part.  The actual binding cannot be performed within the Word interface but the fields can be inserted ready for binding later.  These fields are available through the Developer ribbon.  This ribbon is not displayed by default,  consequently the first step is to change the default settings of Word so that it is displayed.  To do this perform the following Steps

Ø  Click on the Round Office Logo in the top left corner of Word

Ø  Click on the Word Options button at the bottom of the menu

Ø  Click on the Popular Tab (if it is not already displayed)

Ø  Check the box Show Developer tab in the ribbon

Ø  Click OK

The following image shows the location of this option:

Image002

Once the Developer Tab has been switched on the following ribbon can be displayed by clicking on Developer

Image003

The control section of this ribbon provides access to the form fields.  As this form is for printing and review not for entry only the basic text field is to be used.  This will allow the placement of text fields within the table.

Ø  To insert a text field perform the following steps:

Ø  Click in the document where you would like the field to appear

Ø  Click on the Text Field button

The key option is Design Mode.  When in Design mode it is possible to insert and edit the Form Fields.  The text field will be inserted at the current cursor position.  The text field properties then need to be changed so that it is distinguishable from the other fields that will be placed onto the form.  To edit the field perform the following steps:

Ø  Right Click on the Form Field

Ø  Select Properties

Ø  Enter a Title for the Form

Ø  Click OK

Ø  Select the text inside the field

Ø  Press the delete key to remove it

The following diagram shows the Properties dialog:

Image004

Once all the forms have been created in this way the following form is visible:

Image005

The next stage in the process is to create a static version of the document that contains the values from a custom part.

Filed under  //   Form Fields   Microsoft   OpenXML   PASW Data Collection   custom part   docx