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

From SmartWiki
Jump to: navigation, search
Line 1: Line 1:
'''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:
+
This field type provides the ability to dynamically create an MS Word document from underlying [[SmartSimple]] data.  
  
* Any MS Word document can be used, up to and including MS Word 2007 documents. You can use a normal Word document (doc or .docx), or you can use Word templates (.dot or .dotx).
+
The feature works as follows:
 +
* Any MS Word document can be used, up to and including MS Word 2007 documents.  
 +
* You can use a normal Word document (doc or .docx), or you can use Word templates (.dot or .dotx).
 
* 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 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]].
  
Line 20: Line 22:
 
* Right-click on the Form Field and select Properties. Then provide a name for the field in the Bookmark section.
 
* Right-click on the Form Field and select Properties. Then provide a name for the field in the Bookmark section.
  
'''SmartFolder'''
+
==Upload to SmartFolder==
 
When the document/template is ready it must be uploaded to a [[Smart Folder]].
 
When the document/template is ready it must be uploaded to a [[Smart Folder]].
 
Once it has been uploaded take note of the ID of either  
 
Once it has been uploaded take note of the ID of either  
 
* The file ID, which can be obtained by hovering your mouse over the file link  
 
* The file ID, which can be obtained by hovering your mouse over the file link  
* The the folder ID, which can be obtained by right-clicking on the folder link and selecting Properties.<br>
+
* The the folder ID, which can be obtained by right-clicking on the folder link and selecting Properties:<br>
[[Image:FolderID.PNG|left]]
+
[[Image:FolderID.gif|left]]
The folder ID is the resourceID. For example if the URL is
+
<br>The folder ID is the resourceID. For example if the URL is
 
<pre>http://smart.smartsimple.org/s_editresource.jsp?resourceid=67159</pre>
 
<pre>http://smart.smartsimple.org/s_editresource.jsp?resourceid=67159</pre>
 
the Folder ID is 67159
 
the Folder ID is 67159
 +
<br>
  
  
 
+
==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.
* You then create the MS Word Merge custom field in [[SmartSimple]] that will be used to dynamically populate the document.
 
  
 
[[Image:WordMerge1.png]]
 
[[Image:WordMerge1.png]]

Revision as of 18:14, 31 March 2009

This 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.
  • You can use a normal Word document (doc or .docx), or you can use Word templates (.dot or .dotx).
  • 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.


To add Form Fields to a MS Word Document:

MS Word 2000-2003:

  • 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: 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:

  • Click on the Menu button and select Word Options
  • 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: 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.

Upload to SmartFolder

When the document/template is ready it must be uploaded to a Smart Folder. Once it has been uploaded take note of the ID of either

  • The file ID, which can be obtained by hovering your mouse over the file link
  • The the folder ID, which can be obtained by right-clicking on the folder link and selecting Properties:


The folder ID is the resourceID. For example if the URL is

http://smart.smartsimple.org/s_editresource.jsp?resourceid=67159

the Folder ID is 67159


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.

WordMerge1.png

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.