Changes

Jump to: navigation, search

Custom Field Type: Special – MS Word Merge

No change in size, 13:14, 18 June 2013
no edit summary
* Only fields containing text can be used for the Word Merge. Please note that you cannot use image fields, file fields etc.
* [[Rich Text]] fields are not suitable for including in MS Word Merges because of the additional encoding to support formatting.
 
===Including Tables===
You can also add data to one or more existing '''tables''' in the resultant MS Word document if you have multiple records that you need to include.
:''For example: to include all Level 2 Activities related to a Level 1 entity you could use'':
table_1=[#(?object=activity)|~description~|~statusname~|~startdate~|~enddate~|$1139409$|#];
* Be sure there are no spaces between the pipes (|) and variables.
* In the example below the first table (identified by position and referenced as table_1) is set to the records associated with the [[Entity|entity]].
[[Image:WordMergeTable.PNG]]
* In the MS Word document you must create a table with the relevant number of columns. The table should only include a single row with the column headings (the heading do '''not''' have to match the field names within SmartSimple.)
* You do '''not''' have to create form fields within the table. New rows will be created automatically and populated with data in the order specified in in the MS Word Merge Custom Field '''Values''' section.
* Tables should be included at the very end of the '''Values''' section.
* The table you create in MS Word for the example above would look like this:
[[Image:WordTable.PNG]]
 
 
===Custom Field IDs===
:::''Useful if you have several different versions of a document to be generated from the same underlying data''
* If you specify the File ID, that specific document will be created.
 
===Including Tables===
You can also add data to one or more existing '''tables''' in the resultant MS Word document if you have multiple records that you need to include.
* In the MS Word document you must create a table with the relevant number of columns. The table should only include a single row with the column headings (the heading do '''not''' have to match the field names within SmartSimple.)
* You do '''not''' have to create form fields within the table. New rows will be created automatically and populated with data in the order specified in in the MS Word Merge Custom Field '''Values''' section.
* Tables should be included at the very end of the '''Values''' section.
* The table you create in MS Word for the example above would look like this:
[[Image:WordTable.PNG]]
 
:''For example: to include all Level 2 Activities related to a Level 1 entity you could use'':
table_1=[#(?object=activity)|~description~|~statusname~|~startdate~|~enddate~|$1139409$|#];
* Be sure there are no spaces between the pipes (|) and variables.
* In the example below the first table (identified by position and referenced as table_1) is set to the records associated with the [[Entity|entity]].
[[Image:WordMergeTable.PNG]]
 
==Generating the Document==
Smartstaff, administrator
4,478
edits

Navigation menu