Document Merge Templates

Word and PDF documents are great tools for creating nicely-formatted documents. There are times when you want to present information from docMgt in one of those nicely-formatted documents. Sometimes manually and other times as part of a workflow. This is where Document Merge Templates come in.

One example is a certificate of completion. In this case a user might get a PDF of a certificate emailed to them once they completed their training. Another example is a welcome letter. Here a letter welcoming a new employee could be generated and emailed to them. One manual example would be a printable envelope. Whenever you needed to print an envelope from a record you could manually merge an envelope template.

 

Merge Document Options

Document merging is simply described as merging content from docMgt into pre-formatted documents. These documents can be Word (*.DOCX), Adobe (*.PDF) or Excel (*.XLXS). The concepts for dealing with each are similar but the techniques a slightly different. We will explain each in this article. Each document type you make “merge-able” is considered a template. We will explain how to create each template type and how to make them available for users in docMgt.

 

Before We Begin

To get started you need to install the docMgt Windows Add-Ins from your docMgt site. Log into your site and click the “user” button on the top right of the toolbar.

 

From there click the “Integration Add-In” button to start the download.

 

Once downloaded, run the installer and make sure “Word Add-In” is selected. Finish the installation then follow the next steps.

 

Word Templates

Word documents are the primary template type. They are the easiest to set up and are usually the go-to type. They are the primary type because not only are they easy to deal with but they can be converted to PDF during the merge process. So, whether you want DOCX or PDF output you can start with Word. Also, since the Add-In we will be using for all template types is implemented in Word, we have everything we need in one place.

Start Word and open a blank document. Then navigate to the “Insert” tab on the ribbon. There you will find the docMgt group of controls. Use the “Log In” command to log into your docMgt site from Word. Once you are logged in some other controls will appear in the docMgt group.

 

The first thing you will want to do is create a “Library” that corresponds to the record type you are working with. Creating a Library gives you a way to associate several merge templates with your record type. This tells docMgt when to make these templates available to users. For instance, if you added a library for your Personnel record type then users viewing a Personnel record will see the available templates. Click the “Select Library” button, click “Add New Library” then select your record type from the list. You can type in your own but it is best to use the list. You can change to another library using the same “Select Library” button.

Once you have selected or created your library you will see 3 options available – “Fields”, “Snippets”, and “Templates”. Fields allow you to place field markers into the document that will be replaced with data when they are used. Snippets allow you to build paragraphs that can be placed into your templates (we will talk about these in a future article). Templates are the list of merge templates available.

For this example, we are creating a new merge template so in your blank document add some text. Let’s use the Personnel example and create a welcome letter. It can be a very basic “welcome to the company” type letter. Add a header and some introduction text. In the body make sure to refer to their position and hire date. We will merge those in later. When you have a little bit of that text you can stop there. From the Insert /docMgt group click Templates and select “Create New Template from This Document”. In the dialog that appears enter values for the Category, Sub Category (if desired) and Name. These values will be used to store the template as a document later. Once you click OK the template is now available for your users.

Log in to your site using your browser and go to a Personnel record. You will see a button on the documents toolbar that reads “Generate New Form” when you hover over it with your mouse. Click this to see the forms available for this type of record. The first tab is the list of E-forms and the second tab is the list or Merge Forms. In the Merge Forms list, you should see your template. Click that and it will merge the document into your record with the record’s data. If you wish the system to save the document as a PDF just click the “Save as PDF” checkbox before you click the template.

That is it! You should now have a new Word (or PDF) document in your record that was based on your merge template.

If you wish to change your template simply make changes in Word and click the save button in Word and the system will file the new version away for you automatically. If you close word and come back later to change the template., simply select the template from the Templates drop down list and your template will open. Make your changes then click the save button in Word.

Download the Word Templates Used in Article

 

PDF Templates

PDF templates are similar to Word template except you need to use Adobe Acrobat (not the reader) to make them. They are mainly used for form-oriented merging like a W9 or some other precisely laid out official form. They are less flexible than Word forms for inserting text into the middle of paragraphs because you are limited to using PDF Fields to hold your data. If you want to have a PDF output of a letter where your text is merged into the sentences, we would suggest using Word and having the system convert it to PDF for you.

Open your PDF in Acrobat and use the Tools / Prepare Form option. Adobe will attempt to place fields where it thinks they may belong. When it is done you can then remove those automatically placed if needed and place your own. On the “Prepare Form” toolbar in Adobe you will see a series of field types. Click on the “Add a Text Field” button and then click on the document where you wish to place your data. Name the field the same as you named the field in docMgt.

This is how docMgt knows what data to place in each field – by its name. If you need to place more than a single docMgt field into a PDF field you can also use variables. For instance, to place “FirstName” and “LastName” from docMgt into a single PDF field use the name “[FirstName] [LastName]” (no quotes). This tells docMgt to concatenate the first and last name into your PDF field.

If you wish to place check boxes and have them checked if a certain value is set in docMgt, use a variable that returns 1 for checked and 0 for not checked. Actually “Yes”, “True” and “1” will work for checked and anything else will not check it. Here is an example to check whether the Status field in docMgt is set to ACTIVE – [IF([Status]|=|Active|1|0)].

Once you have your fields placed, the next thing to do is to add it to your library in docMgt. To do this, use the Word Add-In we used above and when you have your library, select Templates and then select “Manage Templates for the Selected Library”. Click the “Upload New Template” button and navigate to your PDF and select it. Give it a name and click OK. Once it saves you will then be able to edit it to set its Category, Sub Category and Name like we did for the Word template.

Log in to your site using your browser and go to a Personnel record (assuming you filed this template away in the same library).  In the Merge Forms list you should see your new template. Click that and it will merge the document into your record with the record’s data just as before.

That is it! You should now have a new PDF document in your record that was based on your merge template.

If you make changes to the template and want to update it on the server, use the “Manage Templates for the Selected Library” option in Word, select the template to update from the list then click the “Upload Template” button to find your updated PDF and upload it.

Download the PDF Templates Used in Article

 

Excel Templates

Excel spreadsheets are wonderful for building charts from your data. With docMgt you can now merge your data into a spreadsheet just like you do with Word and PDF. All you have to do is add variables to your spreadsheet that match the values in docMgt. For instance, if you want to place the employee’s name in a cell you would enter [Name] in the text where you want the name to show up. Same for all other variables.

Once you have your fields placed, the next thing to do is to add it to your library in docMgt. To do this, use the Word Add-In we used above and when you have your library, select Templates and then select “Manage Templates for the Selected Library”. Click the “Upload New Template” button and navigate to your XLSX file and select it. Give it a name and click OK. Once it saves you will then be able to edit it to set its Category, Sub Category and Name like we did for the Word template.

Log in to your site using your browser and go to a Personnel record (assuming you filed this template away in the same library).  In the Merge Forms list you should see your new template. Click that and it will merge the spreadsheet as a document into your record with the record’s data just as before.

That is it! You should now have a new Excel document in your record that was based on your merge template.

If you make changes to the template and want to update it on the server, use the “Manage Templates for the Selected Library” option in Word, select the template to update from the list then click the “Upload Template” button to find your updated XLSX file and upload it.

Download the XLSX Template Used in Article

 

 

Please Rate this Article

Join Our Mailing List

Join our mailing list to receive the latest news and updates from the docMgt team

You have Successfully Subscribed!

Pin It on Pinterest