Merging Word Documents
Important: This topic discusses using Word templates, which are useful in creating proposals; however, QuoteWerks does NOT limit you to using Word templates to create proposals. For instructions on creating proposals using the built-in QuoteWerks layout designer, see our short video: Create Proposals with QuoteWerks
QuoteWerks can merge data into Microsoft Word documents as described earlier in this chapter. To use a previously created Microsoft Word template, click on the File -> Print/E-mail/Deliver menu and select the appropriate Word document from the Layout tab in QuoteWerks. In the FileName column, the Word template files will have a .doc or .docx file extension.
To create new Word templates you will need to open Microsoft Word and save the new Word template in the Layouts folder in the QuoteWerks directory under the Quote, Order, or Invoice folder. These folders will already exist and do NOT need to be created.
Once saved you can begin editing the Microsoft Word templates.
Using Macros in Microsoft Word Templates
When you create a new template in Microsoft Word you can add QuoteWerks Macros that can merge QuoteWerks information into your template when you print or email the quote. The macros must have two less than symbols (<<) before the macro and and two greater than symbols (>>) after the macro. It should look like this <<&DH_DocName>> when added to the Word template. Ensure that you do NOT add any spaces in the macro.
Choosing a Microsoft Word Template
Microsoft Word templates will appear under the Layout tab in the Deliver Window (File-> Print/E-mail/Deliver):
To select a Microsoft Word template simply check the box next to the name of the layout you would like to use for a quote. All Microsoft Word Layouts will end with either a .doc or .docx under the File Name in the Layout Tab.
Editing a Microsoft Word Template
The Word templates can be edited from the Layout Tab by highlighting the template you would like to apply changes to and clicking the [Edit] button.
The Edit button will launch Microsoft Word and load the selected template in Word so the user can make any changes to the template.
The Word templates support the same macros that are used in the QuoteWerks Layout files. The only difference is that macros inserted in Microsoft Word need to begin with “<<” and end with “>>”. A typical macro will look like this in Microsoft Word: <<&DI_Description>>. Ensure that no spaces exist between the macros and the greater than and less than symbols.
Fields that can be added to Microsoft Word templates include often used fields such as quantity, item description, manufacturer part number, item type, subtotals and grand totals. Product pictures can also be included in the Word templates. For the full list of supported macros, see Cover Page, Literature, and Microsoft Word Template Document Macros.
When previewed or printed, QuoteWerks will merge these macros from the QuoteWerks document into the Word template and convert that Word document to a singular PDF.
If previewed, QuoteWerks will launch Adobe Acrobat PDF viewer so the user can view the quote before sending it out via email or QuoteValet.
Adding Items to a Microsoft Word Template
To add the items’ description to your Word layout you will need to add a beginning and ending macro for the item that tells Word what information to pull from the QuoteWerks document.
For items you would need to designate <<Begin.Items>> and <<End.Items>> to a Word template in order for Microsoft Word to merge the items from the QuoteWerks quote into the Word document.
A sample template would include the macros that would look similar to this <<Begin.Items>><<&DI_Description>>
This would populate the line items’ descriptions from QuoteWerks into the Microsoft Word template when the document is either previewed or printed from QuoteWerks.
Since Microsoft Word is being used as the template creator, the templates can be edited to look however the user would like. Below is a Word template that was designed to look similar to the QuoteWerks layouts by using tables and inserting macros in the tables. It is important when adding macros into Microsoft Word templates that no spaces are inserted in the macros. This template includes macros that will show the items’ descriptions, unit price, extended price, sub total, sales tax, and grand total.
Pictures are supported in Word templates by adding the proper field <<&DI_ItemPicture>> to the template. This will print the picture for any item that has a picture associated with that item.
If the item has no picture the template will simply merge the information over to QuoteWerks and not include any pictures.
Items can also be separated into sections using macros and filters enabling users to separate out rooms, hardware, services, etc. This is done similar to the QuoteWerks layout by filtering by item type such as Products, Services, Hardware, etc.
The format is similar to including all items, but you include the Group Field (currently only Item Type is supported) and the Contents of the Group. This example template only shows the items that have the QuoteWerks Item Type of Product and totals up just those products.
<<ItemType.Product.&DI_ManufacturerPartNumber>> - <<ItemType.Product.&DI_Description>>
A Total function can also be used for totaling cost, price, and list of item types. The format is similar to <<ItemType.Product.Totals.&DI_ExtendedPrice>> for totaling the Extended Price of Item Type Product. Likewise, you can total the Cost of Service Item Types like <<ItemType.Service.Totals.&DI_ExtendedCost>>. For the Total List, you would use the<<ItemType.Service.Totals.&DI_ExtendedList>> macro.
The advantage of creating templates in Microsoft Word is that any user can make changes without having to open QuoteWerks. It also allows users to create more of a proposal format where items can be added in with static text and tables can be utilized to separate the items from text sections.
The printed output of the Microsoft Word template will merge the information from the open QuoteWerks document into the Word template and convert the document to a PDF and then open the document in Adobe Acrobat for the user to view when clicking the [Preview] button in the QuoteWerks Print window.
If you select to email the document, it will first be merged into Microsoft Word using the selected Word template and then converted to a PDF. However, Adobe will not be launced and no preview will be available. Instead, the QuoteWerks built-in email client will launch and attached to that email will be the PDF version of the quote.