This blog article explains how to build an address block and format it properly with DocumentsCorePack for MS CRM 2013 templates (.docx). With the DocumentsCorePack Field Properties-functionality, users can easily format every address line and define specific line behaviour if the information was not stored in CRM.
Requirements: DocumentsCorePack (DCP) for MS CRM 2013
How to build an address block
An address block can easy be created with the DocumentsCorePack Template Designer. To do so, open MS Word and navigate to the www.mscrm-addons.com-tab. Click on the [Insert MailMerge Fields]-button and answer the question in teh DocumentsCorePack Question box with a click on the [Yes]-button in order to get to the DocumentsCorePack Task Pane.
Once you have selected the Entity Type to work with (here: Account), you can start to insert the proper MailMerge Fields to your future address block. To do so, double-click on the required field to insert it into the document.
Now save your template with a click on the [Save Template]-button at the top.
In the next window, define a name for the template e.g. Accounting_AddressBlock and click on the [Save]-button in order to continue.
Once your template is saved, select the appropriate CRM Data with a click on the [Choose CRM Data]-button. In the so opened window, type in the Name of the entity you are looking for and click on the
-button in order to look for it. Select the right result with a click on it, so it is highlighted in blue. Next, click on the [Select]-button in order to continue.
Figure 8 shows a possible result after the document merge, while figure 9 shows the mailmerge fields of the template.
As you can see, there is several address information missing, because the specific data has not been saved previously in CRM.
In order to format the address block properly, click in one of the fields and then on the [Field properties]-button to define what should happen if the information was missing in CRM.
The String Properties-window will pop up.
Now you can select between two different field options.
Please note: all characters like hyphens, colons, commas as well as words or additional text (e.g. version #: <>) are also counted as signs. Because of that, the whole line will not be deleted. In this case you have to select the second option.
Addional formatting information:
We recommend to activate the Show/Hide formatting marks symbol
Figure 13: Activate the “Show/Hide” formatting marks symbol
In order to avoid line distance, users can press [Shift] + [Enter].
In this case the line ends where the Show/Hide formattings marks symbol is placed. Then the two lines are joined together and will be treated as one line/row. E.g if you mark the <> content control and click on the second checkbox, <> as well as <> will be deleted.
To learn more about how to remove blank lines except for address blocks, please read our blog article about the DocumentsCorePack Insert Remove Empty Line-button.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to firstname.lastname@example.org.