A .docx template is a normal Word document with merge fields in it. When you print, Qoblex replaces each field with real order data and produces a PDF. This article walks through building one in Word, one step at a time.
By the end you will have a template with a logo, a line-item table, a product picture and formatted notes, saved and ready to upload.
Before you start
You need Microsoft Word on your computer. Every step below happens in Word. The upload step is in Upload and test a .docx template.
The exact field names for each document are listed in the field articles, starting with .docx fields for sales documents. The examples here use sales fields such as Number and ProductName, and the steps use a sales template. Purchase order, packing slip and refund templates use their own field and range names, so check .docx fields for purchase orders, .docx fields for packing slips or .docx fields for refunds before you reuse these steps for one.
Start from a default template
Do not start from a blank page. A default template already has the fields, the table and the formatting working, so you only change what you want.
- In Qoblex, open Account Settings, then click Documents. The Branding and Customization page opens.
- In the Document Customization section, click Add .docx Template.
- In the Document Template Editor, click the link for the document you want: sales, purchase or packing slip.
- Open the downloaded file in Word.
There is no default download for refunds. For a refund template, start from the sales template and use the refund fields from .docx fields for refunds. The refund line range has a different name from the sales one, so the sales OrderItems and CustomItems rows print nothing until you rename them as that article describes.
Clicking Add .docx Template starts a new template. If you only wanted the default file, click Delete this template to leave the editor without keeping a template. Clicking Close before you upload a file shows Please upload a custom template file to continue or delete this element.
Show the field codes in Word
A merge field shows as a name in angle quotes, such as «Company.Name». Behind it sits a field code that holds the real instruction. You need to see that code to check names and to copy fields correctly.
Press Alt+F9 to switch every field between its value view and its code view. In code view a field looks like this:
{ MERGEFIELD Company.Name \* MERGEFORMAT }
The word after MERGEFIELD is the field name Qoblex looks for. Press Alt+F9 again to go back to the normal view. On some laptops you need Fn+Alt+F9.
Work in code view whenever you check spelling, and in normal view when you check the layout.
Insert a merge field
Follow these steps for every piece of order data you want on the page.
- Click where the value should appear.
- Go to Insert, then Quick Parts, then Field.
- In Field names, choose MergeField.
- In Field name, type the name exactly as listed, for example
Company.Name. - Click OK.
Word shows «Company.Name» in your document. At print time Qoblex replaces it with your company name.
Type the name exactly
Copy field names from the field articles instead of retyping them. Capital letters do not matter, so subtotal and SubTotal fill the same value. A misspelled or unknown field prints nothing: there is no error and no placeholder, just a blank. Check the name after MERGEFIELD.
Keep the prefixes exactly as written: RangeStart:, RangeEnd:, Picture: and Html:. Qoblex checks Html: with that exact capital H, so html:Notes is not treated as formatted notes.
Add number and date formats
A number field prints as it is, with every decimal and no thousands separator, such as 1247.067. A date field prints with the time as well. Add a format switch in code view, for example \# "#,##0.00" for 1,247.07 or \@ "dd MMM yyyy" for 20 Oct 2026. The default templates already carry these switches, so copying a field from them is the easiest route. A true/false field prints True or False.
Copy a field from the default template
The quickest way to add a field the template already uses is to select it in the default file, copy it, and paste it into your own document. The formatting switches that come with it, such as number and date formats, come along.
Build the line-item table
A line-item table prints one row for every product on the order. You mark the repeating row with two special fields.
- Insert a table with one header row and one data row.
- In the header row, type your column titles, for example Product, Qty, Price, Total.
- In the first cell of the data row, insert the field
RangeStart:OrderItems. - In the same cell, after it, insert
ProductName. - In the next cells, insert
Quantity,PriceandTotal. - In the last cell of the same row, after the
Totalfield, insertRangeEnd:OrderItems.
Qoblex repeats the whole row once for each product line, and the header row prints once. The name after the colon, OrderItems, is the list of product lines on a sales order. Packing slips and refunds name their list differently. On a packing slip the repeating row is RangeStart:Items and RangeEnd:Items, and the notes field is CustomerNotes, as in .docx fields for packing slips. On a refund it is RefundItems.
Check the row
For a table, both range fields sit in the same row: RangeStart: in the first cell and RangeEnd: in the last cell. The name after the colon must be the same on both. If the names differ, the print fails.
Inside a range, only that item’s fields fill in. A top-level field such as Number placed between the range fields prints blank, so keep order-level fields outside the row.
Ranges also work outside tables. With both fields in one paragraph, the items run on together in that paragraph. With the start in one paragraph and the end in a later one, the whole block of paragraphs repeats for each item.
Press Alt+F9 and read along the row. You should see RangeStart:OrderItems first and RangeEnd:OrderItems last, with your data fields between them.
Rows for extra items
The default sales template has a second repeating row for extra charge lines you add to the order, using RangeStart:CustomItems and RangeEnd:CustomItems. If an order has none, the content of that range does not print. In a table, the header row above it still prints, so leave that header out or accept an empty heading row.
Add a logo and other fixed content
Anything that is not a field prints exactly as you typed it. Use this for your logo, headings, bank details, terms and footers.
- Click where the logo belongs, for example in the page header.
- Go to Insert, then Pictures, and choose your logo file.
- Resize it, and set its position with Wrap Text if needed.
The logo is part of the Word file, so it prints on every document that uses the template. To change it later, download the file with Click to download this template…, edit it, then add it again as a new .docx template and delete the old one with Delete this template.
Use a web-sized logo image, so the file stays small.
Add a product picture
Use the Picture: prefix to print the product image in each row of your line-item table.
- Click in the table cell where the image should print, inside the repeating row.
- Insert a merge field named
Picture:Image. - Press Alt+F9 and check the code starts with
MERGEFIELD Picture:Image.
The default templates add \y after the name and keep a small placeholder picture inside the field. Copying the image cell from the default template is the easiest way to get the same setup.
Size the picture
Resize the placeholder picture inside the field, print a test order, and adjust until the image is the size you want.
Print a test order that includes a product without an image to see how that row looks.
Add formatted notes
Order notes can contain bold text, lists and paragraphs. Use the Html: prefix to keep that formatting in the PDF.
- Click on its own empty line below your table.
- Insert a merge field named
Html:Notes. - Press Alt+F9 and check the code starts with
MERGEFIELD Html:Notes.
Qoblex then prints the notes with their formatting, such as bold text. A plain Notes field prints the raw text with tags such as <p> in it. The default sales template uses exactly this field. If an order has no notes, the line disappears and leaves no blank line.
Keep the field on its own line
Put Html:Notes alone in its paragraph. When it is alone, the formatted notes replace that paragraph. If other text shares the line, the notes break out onto their own lines and split the text around them.
Save as .docx
Qoblex accepts only Word documents saved with the .docx extension.
- In Word, choose File, then Save As.
- In Save as type, choose Word Document (*.docx).
- Give the file a clear name and save it.
Do not use Word 97-2003 Document (*.doc), Word Template (*.dotx) or a macro-enabled file. Qoblex rejects them with the message The selected file is not a valid Microsoft Word DOCX document.
Keep the file under 5 MB. If a file is too big, Qoblex shows This file is too big. The maximum file size allowed is 5MB.
Next step
Upload the file and print a sample order to check it. See Upload and test a .docx template.
Tips that save time
- Change one thing at a time, then test. A single typo is much easier to find that way.
- Design one packing slip. When you print several at once from the Sales list, each one starts on a new page and keeps your page setup, headers and footers.
- Use common fonts and check them on a test print.
- If a field does not show your data, check its spelling against the field list.
My field does not show my data
MERGEFIELD against the field article for your document. A misspelled field prints blank without an error. Make sure you inserted it with Quick Parts and did not type the angle quotes by hand.The table prints once, not once per product
RangeStart:OrderItems is in the first cell and RangeEnd:OrderItems is in the last cell of the same row. Check the name after the colon matches on both. If the names differ, the print fails instead.The notes show HTML tags in the PDF
Html:Notes, with a capital H and a colon. A plain Notes field prints the notes as raw text, tags included. Use Html:Notes.