Changes

Custom Field Type: Special – MS Word Merge

11,432 bytes added, 18:14, 4 December 2018
no edit summary
'''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:__TOC__
* 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).==General Description==* You must first create a document which includes This field type provides the MS Word Form Fields ability to be populated by SmartSimple. Each Form Field must be provided with a name (called a '''Bookmark''' in dynamically create an MS Word). This name will be used to link the form field on the Word document to a Standard or Custom Field within from underlying [[SmartSimple]]data.
Configuring a Word Merge in SmartSimple is a three-step process:
'''To add # Create the MS Word document that will be used as the template. (See [[Adding Form Fields to a MS Word Document:]] for instructions.)# Upload the Word document to a [[SmartFolder]]. (See [[Uploading Word Merge Document to a SmartFolder]] for instructions.)# '''This page describes how to create a Custom Field Type: Special - MS Word 2000-2003: * From Merge custom field that maps the '''View''' Menu select '''Toolbars''' and enable SmartSimple fields you wish to merge to the Word template.'''Forms''' Toolbar* On the forms
* Once complete, the <!--<span class="mceNonEditable template is uploaded to a [[Smart Folder]]." id="bs_template:@@@TPL0@@@" data-bs-name=" FieldOptions" data-bs-type="template" data-bs-id="0"><span class="mceNonEditable template" id="bs_template:@@@TPL0@@@" data-bs-name=" FieldOptions" data-bs-type="template" data-bs-id="0"><span class="mceNonEditable template" id="bs_template:@@@TPL0@@@" data-bs-name=" FieldOptions" data-bs-type="template" data-bs-id="0"><span class="mceNonEditable template" id="bs_template:@@@TPL0@@@" data-bs-name=" FieldOptions" data-bs-type="template" data-bs-id="0"><span class="mceNonEditable template" id="bs_template:@@@TPL0@@@" data-bs-name=" FieldOptions" data-bs-type="template" data-bs-id="0"><span class="mceNonEditable template" id="bs_template:@@@TPL0@@@" data-bs-name=" FieldOptions" data-bs-type="template" data-bs-id="0">{{ FieldOptions }}</span></span></span></span></span></span>--><!--<span class="mceNonEditable template" id="bs_template:@@@TPL2@@@" data-bs-name="AppearMandatory" data-bs-type="template" data-bs-id="2"><span class="mceNonEditable template" id="bs_template:@@@TPL2@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="2"><span class="mceNonEditable template" id="bs_template:@@@TPL2@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="2"><span class="mceNonEditable template" id="bs_template:@@@TPL2@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="2"><span class="mceNonEditable template" id="bs_template:@@@TPL1@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="1"><span class="mceNonEditable template" id="bs_template:@@@TPL1@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="1"><span class="mceNonEditable template" id="bs_template:@@@TPL1@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="1">{{ AppearMandatory }}</span></span></span></span></span></span></span>* You then create the MS Word Merge custom field in [[SmartSimple]] that will be used to dynamically populate the document.<span class="mceNonEditable template" id="bs_template:@@@TPL3@@@" data-bs-name="ToolTip" data-bs-type="template" data-bs-id="3"><span class="mceNonEditable template" id="bs_template:@@@TPL3@@@" data-bs-name=" ToolTip" data-bs-type="template" data-bs-id="3"><span class="mceNonEditable template" id="bs_template:@@@TPL3@@@" data-bs-name=" ToolTip" data-bs-type="template" data-bs-id="3"><span class="mceNonEditable template" id="bs_template:@@@TPL3@@@" data-bs-name=" ToolTip" data-bs-type="template" data-bs-id="3"><span class="mceNonEditable template" id="bs_template:@@@TPL2@@@" data-bs-name=" ToolTip" data-bs-type="template" data-bs-id="2"><span class="mceNonEditable template" id="bs_template:@@@TPL2@@@" data-bs-name=" ToolTip" data-bs-type="template" data-bs-id="2"><span class="mceNonEditable template" id="bs_template:@@@TPL2@@@" data-bs-name=" ToolTip" data-bs-type="template" data-bs-id="2">{{ ToolTip }}</span></span></span></span></span></span></span><span class="mceNonEditable template" id="bs_template:@@@TPL4@@@" data-bs-name="HideFieldForNewRecord" data-bs-type="template" data-bs-id="4"><span class="mceNonEditable template" id="bs_template:@@@TPL4@@@" data-bs-name=" HideFieldForNewRecord" data-bs-type="template" data-bs-id="4"><span class="mceNonEditable template" id="bs_template:@@@TPL4@@@" data-bs-name=" HideFieldForNewRecord" data-bs-type="template" data-bs-id="4"><span class="mceNonEditable template" id="bs_template:@@@TPL4@@@" data-bs-name=" HideFieldForNewRecord" data-bs-type="template" data-bs-id="4"><span class="mceNonEditable template" id="bs_template:@@@TPL3@@@" data-bs-name=" HideFieldForNewRecord" data-bs-type="template" data-bs-id="3"><span class="mceNonEditable template" id="bs_template:@@@TPL3@@@" data-bs-name=" HideFieldForNewRecord" data-bs-type="template" data-bs-id="3"><span class="mceNonEditable template" id="bs_template:@@@TPL3@@@" data-bs-name=" HideFieldForNewRecord" data-bs-type="template" data-bs-id="3">{{ HideFieldForNewRecord }}</span></span></span></span></span></span></span>
[[Image<span class="mceNonEditable template" id="bs_template:WordMerge1.png]]@@@TPL5@@@" data-bs-name="OptionsTab" data-bs-type="template" data-bs-id="5"><span class="mceNonEditable template" id="bs_template:@@@TPL5@@@" data-bs-name=" OptionsTab" data-bs-type="template" data-bs-id="5"><span class="mceNonEditable template" id="bs_template:@@@TPL5@@@" data-bs-name=" OptionsTab" data-bs-type="template" data-bs-id="5"><span class="mceNonEditable template" id="bs_template:@@@TPL5@@@" data-bs-name=" OptionsTab" data-bs-type="template" data-bs-id="5"><span class="mceNonEditable template" id="bs_template:@@@TPL4@@@" data-bs-name=" OptionsTab" data-bs-type="template" data-bs-id="4"><span class="mceNonEditable template" id="bs_template:@@@TPL4@@@" data-bs-name=" OptionsTab" data-bs-type="template" data-bs-id="4"><span class="mceNonEditable template" id="bs_template:@@@TPL4@@@" data-bs-name=" OptionsTab" data-bs-type="template" data-bs-id="4">{{ OptionsTab }}</span></span></span></span></span></span></span><span class="mceNonEditable template" id="bs_template:@@@TPL6@@@" data-bs-name="AppearMandatory" data-bs-type="template" data-bs-id="6"><span class="mceNonEditable template" id="bs_template:@@@TPL6@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="6"><span class="mceNonEditable template" id="bs_template:@@@TPL6@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="6"><span class="mceNonEditable template" id="bs_template:@@@TPL6@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="6"><span class="mceNonEditable template" id="bs_template:@@@TPL5@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="5"><span class="mceNonEditable template" id="bs_template:@@@TPL5@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="5"><span class="mceNonEditable template" id="bs_template:@@@TPL5@@@" data-bs-name=" AppearMandatory" data-bs-type="template" data-bs-id="5">{{ AppearMandatory }}</span></span></span></span></span></span></span><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name="DisableFromGlobalSearch" data-bs-type="template" data-bs-id="7"><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name=" DisableFromGlobalSearch" data-bs-type="template" data-bs-id="7"><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name=" DisableFromGlobalSearch" data-bs-type="template" data-bs-id="7"><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name=" DisableFromGlobalSearch" data-bs-type="template" data-bs-id="7"><span class="mceNonEditable template" id="bs_template:@@@TPL6@@@" data-bs-name=" DisableFromGlobalSearch" data-bs-type="template" data-bs-id="6"><span class="mceNonEditable template" id="bs_template:@@@TPL6@@@" data-bs-name=" DisableFromGlobalSearch" data-bs-type="template" data-bs-id="6"><span class="mceNonEditable template" id="bs_template:@@@TPL6@@@" data-bs-name=" DisableFromGlobalSearch" data-bs-type="template" data-bs-id="6">{{ DisableFromGlobalSearch }}</span></span></span></span></span></span></span>--><!--==Value Storage==<span class="mceNonEditable template" id="bs_template:@@@TPL8@@@" data-bs-name="ValueStoresTo" data-bs-type="template" data-bs-id="8"><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name=" ValueStoresTo" data-bs-type="template" data-bs-id="7"><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name=" ValueStoresTo" data-bs-type="template" data-bs-id="7"><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name=" ValueStoresTo" data-bs-type="template" data-bs-id="7">{{ ValueStoresTo }}</span></span></span></span>
The values section <span class="mceNonEditable template" id="bs_template:@@@TPL9@@@" data-bs-name=" CFPermissionsTab" data-bs-type="template" data-bs-id="9"><span class="mceNonEditable template" id="bs_template:@@@TPL8@@@" data-bs-name=" CFPermissionsTab" data-bs-type="template" data-bs-id="8"><span class="mceNonEditable template" id="bs_template:@@@TPL8@@@" data-bs-name=" CFPermissionsTab" data-bs-type="template" data-bs-id="8"><span class="mceNonEditable template" id="bs_template:@@@TPL8@@@" data-bs-name=" CFPermissionsTab" data-bs-type="template" data-bs-id="8">{{ CFPermissionsTab }}</span></span></span></span>-->==Set Up: Creating the Field=====Setting the Values===Now that the Word document to be used as the template [[Adding Form Fields to a MS Word Document|has been created (step 1)]] and [[Uploading Word Merge Document to a SmartFolder|uploaded to a SmartFolder (step 2)]], you can now proceed to step 3: creating the MS Word Merge custom field that will be completed in two ways:used to dynamically populate the document.
* The value can be In the '''Values''' section, the form fields you created on the MS Word document are now assigned by name to the Form field: Byfirstname=@me.firstname@; the Form associated [[SmartSimple]] Field value is set to the Names or [[UserCustom Field ID|userField IDs]]. The syntax is ''s first name by referencing the Mergefield = @me.firstname@ variable.* The value can be assigned by position to the Form SmartSimple field: @#468535#name@; the third form field value will be set custom field ID @#468535#@. ''where 'Note'Mergefield'': is a Bookmark you have assigned to a Form Field references are semi-colon delimitedin [[Adding Form Fields to a MS Word Document|step 1]].
You can also add data to one : ''Examples:'': ''signatory=@me.fullname@;'':: or more existing tables : ''datesigned=@#565346#@;'': [[Image:WordMergeValues.png|link=]]* Each ''Form Field'' on the MS Word Merge Document should be represented on a different line in the resultant MS Word document if you have multiple records Merge Field '''Values''' section, and each line must end with a semi-colon.* The variables used for the '''MS Word Merge''' are the same as for a [[Web Page View Field]] and can be found at [[Web Page View Field Variables]].* Only fields containing text can be used for the Word Merge. Please note that you need 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 includesupport formatting.* In The sequence is not important, as the variables are matched using the example above bookmark name.** The only exception is when SmartSimple variables are merged to a Word table; the first table (identified by position references must be at the bottom of the list of '''Values'''. See [[Including Tables in a Word Merge Document|this page]] for instructions on configuration.* You can assign more than one field from SmartSimple into a single MS Word form field, and referenced as table_1) 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* You can include ''&lt;!--hideifnotfound-->'' in front of variables that may not be present to ensure nothing is set displayed, rather than the variable name.** An example would be ''monthlyfee=&lt;!--hideifnotfound-->@monthly fee@;''* You can include HTML code embedded within tags. The SmartSimple Word Merge engine will apply the HTML formatting to the records associated with value before merging to the Word document.** Note that HTML code will only function when merging to a single record, not for the [[EntityExporting List View Results to Microsoft Word|entitybatch merge mode]].** Example:
You must specify the <pre>bookmarkname=</pre>[[Smart Folder]#(?object=activity)#] 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{| style="width: 100%;"|-!|#!|Date!|Details|-| style="width: 10%;"|~Index~| style="width: 40%;"|<!--@sscalculation(DATE_FORMAT("~startdate~","%d %M %Y"))-->| style="width: 10%;"|$Activity Details$|user]] can choose the document that he}<pre>;</she wishes to create.pre>* If you specify * You can use the Document ID then that specific document will be created.* Once configured, you click following special characters in this section to control the button associated with output on the MS Word Merge and the document will be dynamically created and the [[SmartSimple]] data added.:*** ^p = Line break* 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.** ^t = Tab
===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|link=|400px]]<br />'''Uploading an MS Word Merge document to a custom fieldSee [[Custom Field IDs]] for more information.'''
Documents created in this manner are "disconnected" from ===Smart Folder/File ID===You must also specify the either the Field ID or File ID (as described [[SmartSimple]]. If you wish to upload Uploading_Word_Merge_Document_to_a_SmartFolder|in the document to [[SmartSimpleprevious step]] you can use one ) of two techniques:* Login and upload the MS Word document to the appropriate single or multiple file field.<br />* Use the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-InImage:FileID.PNG|plug-inlink=]] to automatically attach the document to a specified single or multiple file field, without directly logging into the system.
'''SmartDoc plug*** If you specify the Folder ID, all documents in the folder will be displayed in a combo-in box upon initiating the Word merge. The [[User|user]] can select the document uploadingthat 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 used as the template for the Word merge.
==Generating the Document==* To use ** In order to generate the document when viewing or editing a record you simply click the button associated with the [[SmartDoc for Microsoft MS Word Integration|SmartDoc]] Merge.***: ''If a Folder ID was specified in the [[Plug-In|plug-inCustom Field]] settings you will be prompted to upload a Word select which document you need to specify the field that should be used to store the document.''*** The field name is set in document will be dynamically created and the MS Word merge field type - [[Custom FieldSmartSimple]] settingdata added.* Once the document has been completed off-line, ** '''Note''': If the [[User|user]] selects Upload Document in MS Word and wishes to edit or retain the document will be uploaded and attached he/she may need to use the fieldMS Word '''Save As''' feature. Some [[Browser|browsers]] may cause it to be read only initially.* You will need ** Remember to download and install check the latest version size of the [[SmartDoc for Microsoft Word Integration|SmartDoc]] [[Plug-In|plug-in]]file, header and footer pictures may interrupt the document to merge.
==Field Options==All common options:<br />[[Custom Fields - General Information #General_Settings|General Settings]]<br />[[Custom Fields - General Information #Role Field Permissions and Status Field Permissions|Permissions & Availability]]<br />[[Custom Fields - General Information #Classic Options|Classic Options]]<br />For further information, please refer to [[Category:EnhancementsCustom Fields – General Information]].<br /><br />Options listed below are specific to this particular field type.<br>* '''Value''' - Allows the form fields you created on the MS Word document are now assigned by name to the associated [[SmartSimple]] Field Names or [[Custom Field ID|Field IDs]]* '''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.{{ButtonLabel}} For Word Merge fields, the default label is "Open".* '''SmartFolder / File ID''' - Here you can specify the either the Field ID or File ID (as described [[Uploading_Word_Merge_Document_to_a_SmartFolder|in the previous step]]) of the MS Word document. ==See Also=={{WordMergeLinks}} [[Category:Custom FieldsPlug-Ins for Microsoft Office]]{{CustomFieldPageFooter}}
Smartstaff, administrator
421
edits