Difference between revisions of "Custom Field Type: Special – MS Word Merge"

From SmartWiki
Jump to: navigation, search
m (Reverted edits by Cameron (Talk); changed back to last version by Julia Decker)
Line 1: Line 1:
This field type provides the ability to dynamically create an MS Word document from underlying [[SmartSimple]] data.  
+
'''MS Word Merge Field''' - This new field type provides the ability to dynamically create an MS Word document from underlying [[SmartSimple]] data. The feature works as follows:
  
The feature works as follows:
+
* Any MS Word document can be used, up to and including MS Word 2007 documents (DOCX, DOTX).
* Any MS Word document can be used, up to and including MS Word 2007 documents.
+
* You must first create a document template which includes standard MS Word Form fields matching the names of the [[SmartSimple]] [[Variables|variable]] names that you wish to reference.
* You can use a normal Word document (doc or .docx), or you can use Word templates (.dot or .dotx).
+
* Once complete, the template is uploaded to a [[Smart Folder]].
* You must first create a document which includes the MS Word Form Fields to be populated by SmartSimple. Each Form Field must be provided with a name (called a '''Bookmark''' in MS Word). This name will be used to link the form field on the Word document to a Standard or Custom Field within [[SmartSimple]].
+
* You then create the MS Word Merge custom field in [[SmartSimple]] that will be used to dynamically populate the document.
  
 +
The values section can be completed in two ways:
  
==Adding Form Fields to a MS Word Document:==
+
* The value can be assigned by name to the Form field: Byfirstname=@me.firstname@; the Form Field value is set to the [[User|user]]'s first name by referencing the @me.firstname@ variable.
===MS Word 2000-2003:===
+
* The value can be assigned by position to the Form field: @#468535#@; the third form field value will be set custom field ID @#468535#@. '''Note''': Field references are semi-colon delimited.
* From the '''View''' Menu select '''Toolbars''' and enable the '''Forms''' Toolbar
 
* Click in your Word document wherever you wish to insert a Form Field.
 
* On the Forms Toolbar click on the first button to insert a Form Field into your document: [[Image:FormsToolbar.gif]]
 
* Right-click on the Form Field and select Properties. Then provide a name for the field in the Bookmark section.
 
  
===MS Word 2007:===
+
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.
* Click on the Menu button and select '''Word Options'''
+
* In the example above the first table (identified by position and referenced as table_1) is set to the records associated with the [[Entity|entity]].
* In the '''Popular''' selection ''Show Developer Tab in the Ribbon''
 
* Click in your Word document wherever you wish to insert a Form Field.
 
* On the Developer Menu select the '''Legacy Tools''' icon which is in the Controls section: [[Image:2007Forms.gif]]
 
* On the Legacy Forms menu click the first icon to insert a Form Field.
 
* Right-click on the Form Field and select Properties. Then provide a name for the field in the Bookmark section.
 
  
 +
You must specify the [[Smart Folder]] ID where the documents are located or the file ID.
  
==Upload to SmartFolder==
+
* If you specify the [[Smart Folder]] ID all documents in the folder will be displayed in a dropdown upon initiating the Word merge and the [[User|user]] can choose the document that he/she wishes to create.
When the document/template is ready it must be uploaded to a [[Smart Folder]]. Once it has been uploaded take note of either:
+
* If you specify the Document ID then that specific document will be created.
* The file ID, which can be obtained by hovering your mouse over the file link<br />-or-
+
* Once configured, you click the button associated with the MS Word Merge and the document will be dynamically created and the [[SmartSimple]] data added.
* The the folder ID, which can be obtained by right-clicking on the folder link and selecting Properties:<br>
+
* The document can then be saved locally. '''Note''': the [[User|user]] will need to use the MS Word Save As feature as the document will be read-only.
[[Image:FolderID.PNG|left]]
 
<br>The folder ID is the resourceID. For example if the URL is
 
<pre>http://smart.smartsimple.org/s_editresource.jsp?resourceid=67159</pre>
 
the Folder ID is 67159
 
<br>
 
<br>
 
<br>
 
==Creating the MS Word Merge Field==
 
You can now create the MS Word Merge custom field in [[SmartSimple]] that will be used to dynamically populate the document.<br>
 
[[Image:WordMerge1.png]]
 
* In the '''Values''' section: the form fields you created on the MS Word document are now assigned by name to the associated [[SmartSimple]] Field Names or Field IDs:
 
::''signatory=@me.fullname@;''
 
:::or
 
::''datesigned=@#565346#@;''
 
* '''Note''': Field references are semi-colon delimited.
 
* You can assign more than one field from SmartSimple into a single MS Word form field, and include other text and characters:
 
::''time=@starth@:@startminute@ @startpmam@;'' would display in this format: '''"12:35 pm"''' in the time form field
 
:::or
 
::''contractdetails=@duration@ with a monthly fee of $@monthlyfee@;'' would result in '''"24 months with a monthly fee of $200"''' in the contractdetails form field
 
  
''In general, the variables used for the '''MS Word Merge''' are the same as for a
+
'''Uploading an MS Word Merge document to a custom field'''
[[Web Page View Field]] and can be found at [[Web Page View Field Variables]]
 
 
 
===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: all Level 2 Activities related to a Level 1 entity''
 
* 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.
 
* The table you create in MS Word for the example above would look like this:
 
[[Image:WordTable.PNG]]
 
 
 
 
 
===Custom Field IDs===
 
You can use the Extract IDs and Display Field Names links in the  section to display associated Field IDs and Field Names.<br>
 
[[Image:Extract.PNG]]
 
''This is for information only. Data in the Custom Field IDs section does not control any behaviour.''
 
 
 
===Smart Folder/File ID===
 
You must also specify the either the Field ID or File ID (as described [[#Upload to SmartFolder|above]]) of the MS Word document.<br>
 
[[Image:FileID.PNG]]
 
* If you specify the Folder ID, all documents in the folder will be displayed in a combo-box upon initiating the Word merge. The [[User|user]] can select the document that he/she wishes to create.
 
:::''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.
 
 
 
==Generating the Document==
 
* In order to generate the document when viewing or editing a record you simply click the button associated with the MS Word Merge.
 
::''If a Folder ID was specified in the [[Custom Field]] settings you will be prompted to select which document should be used.''
 
* The document will be dynamically created and the [[SmartSimple]] data added.
 
*'''Note''': If the [[User|user]] wishes to edit or retain the document he/she may need to use the MS Word '''Save As''' feature. Some [[Browser|browsers]] may cause it to be read only initially.
 
 
 
 
 
==Uploading the MS Word Merge Document to a Custom Field==
 
The document created when you click on the MS Word Merge button is "disconnected" from [[SmartSimple]]. If you wish to upload the document to [[SmartSimple]] you can use one of two techniques:
 
* Login and upload the document to the appropriate single or multiple file field.<br />-or-
 
* Use the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-In|plug-in]] to automatically upload the document to a specified single or multiple file field, without directly logging into the system.
 
  
 +
Documents created in this manner are "disconnected" from [[SmartSimple]]. If you wish to upload the document to [[SmartSimple]] you can use one of two techniques:
 +
* Login and upload the document to the appropriate single or multiple file field.
 +
* Use the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-In|plug-in]] to automatically attach the document to a specified single or multiple file field, without directly logging into the system.
  
 
'''SmartDoc plug-in document uploading:'''
 
'''SmartDoc plug-in document uploading:'''
  
* To use the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-In|plug-in]] to upload a Word document you need to specify the field within SmartSimple that will be used to store the document. It can be either a [[Custom Field Type: Link – Single File|Single File]] or [[Custom Field Type: Link – Multiple Files|Multiple File]] field.
+
* To use the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-In|plug-in]] to upload a Word document you need to specify the field that should be used to store the document.
* The field name is set in the MS Word Merge Field type - [[Custom Field]] setting.
+
* The field name is set in the MS Word merge field type - [[Custom Field]] setting.
[[Image:StoreTo.PNG]]
+
* Once the document has been completed off-line, the [[User|user]] selects Upload Document in MS Word and the document will be uploaded and attached to the field.
* All [[Custom Field Type: Link – Single File|Single File]] and [[Custom Field Type: Link – Multiple Files|Multiple File]] fields on the same level as the MS Word Merge field will be available in the '''Value Stores To''' combo box.
+
* You will need to download and install the latest version of the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-In|plug-in]].
* Each user will need to download and install the latest version of the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-In|plug-in]] to take advantage of this feature.
 
<br>
 
Once the MS Word Merge document has been generated as described [[#Generating the Document|above]] the [[user]] can edit the document and/or save it locally if desired. <br>
 
Selecting the '''Upload Document''' button on the [[SmartDoc for Microsoft Word Integration|SmartDoc]] toolbar in MS Word will cause the document to uploaded to [[SmartSimple]] and attached to the designated field.
 
 
 
  
 
[[Category:Enhancements]][[Category:Custom Fields]]
 
[[Category:Enhancements]][[Category:Custom Fields]]

Revision as of 14:14, 28 April 2009

MS Word Merge Field - This new field type provides the ability to dynamically create an MS Word document from underlying SmartSimple data. The feature works as follows:

  • Any MS Word document can be used, up to and including MS Word 2007 documents (DOCX, DOTX).
  • You must first create a document template which includes standard MS Word Form fields matching the names of the SmartSimple variable names that you wish to reference.
  • Once complete, the template is uploaded to a Smart Folder.
  • You then create the MS Word Merge custom field in SmartSimple that will be used to dynamically populate the document.

The values section can be completed in two ways:

  • The value can be assigned by name to the Form field: Byfirstname=@me.firstname@; the Form Field value is set to the user's first name by referencing the @me.firstname@ variable.
  • The value can be assigned by position to the Form field: @#468535#@; the third form field value will be set custom field ID @#468535#@. Note: Field references are semi-colon delimited.

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 example above the first table (identified by position and referenced as table_1) is set to the records associated with the entity.

You must specify the Smart Folder ID where the documents are located or the file ID.

  • If you specify the Smart Folder ID all documents in the folder will be displayed in a dropdown upon initiating the Word merge and the user can choose the document that he/she wishes to create.
  • If you specify the Document ID then that specific document will be created.
  • Once configured, you click the button associated with the MS Word Merge and the document will be dynamically created and the SmartSimple data added.
  • The document can then be saved locally. Note: the user will need to use the MS Word Save As feature as the document will be read-only.

Uploading an MS Word Merge document to a custom field

Documents created in this manner are "disconnected" from SmartSimple. If you wish to upload the document to SmartSimple you can use one of two techniques:

  • Login and upload the document to the appropriate single or multiple file field.
  • Use the SmartDoc plug-in to automatically attach the document to a specified single or multiple file field, without directly logging into the system.

SmartDoc plug-in document uploading:

  • To use the SmartDoc plug-in to upload a Word document you need to specify the field that should be used to store the document.
  • The field name is set in the MS Word merge field type - Custom Field setting.
  • Once the document has been completed off-line, the user selects Upload Document in MS Word and the document will be uploaded and attached to the field.
  • You will need to download and install the latest version of the SmartDoc plug-in.