--- title: "Mailing labels" slug: "efp-mailing-labels" description: "Create mailing labels effortlessly with Exact Forms Plus, using Word's mail merge for active customer records. Print up to 5,000 labels in one go!" tags: ["Quickbase Extension", "Document Generation", "Exact Forms Plus"] updated: 2026-10-09T16:24:58Z published: 2026-10-09T16:24:58Z canonical: "help.quickbase.com/efp-mailing-labels" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.quickbase.com/llms.txt > Use this file to discover all available pages before exploring further. # Mailing labels Exact Forms Plus can print a sheet of mailing labels for every record a report or query returns, for example all active customers. It creates one Word or PDF document with all the labels, in the label layout you choose in Word (for example 30 labels per page). Mailing labels work differently from other Exact Forms Plus documents: - The template uses Word's own **mail merge fields**, not `~field~` tokens. - The button usually goes on the template's record in the **Document Templates** table, not on the table with the addresses. - The setup wizard doesn't set up mailing labels. You add the fields and the button yourself, as described on this page. ## Before you start - Exact Forms Plus is set up in the app, so the app has a **Document Templates** table. See [Set up Exact Forms Plus](https://help.quickbase.com/quickbase-extensions/docs/en/exact-forms-plus-setup-with-wizard). - You know which table holds the addresses, for example *Customers*, and its table alias, for example `[_DBID_CUSTOMERS]`. ## Step 1: Prepare the address table 1. **Create an address field (recommended).** One formula text field with the whole address makes the template simple. For example, a field named **AddressBlock**: ```plaintext List("\n", [Company Name], [Address], List(", ", [City], [State/Province]) & " " & [Postal Code]) ``` 2. **Create a report** with the records you want labels for, for example customers with *Status* = *Active*. Add the address field as a column. Save it, then note the report's ID: it's the number after `qid=` in the browser's address bar. Instead of a report, you can pick the records with a Quickbase query in the button (`msqry`). ## Step 2: Create the label template in Word Word needs a sample list to insert merge fields, so start with a small spreadsheet. 1. Export the report from Step 1 to a CSV file, and open it in Excel. Keep the header row and one or two records. Save it as an Excel file. 2. In Word, create a blank document. On the **Mailings** tab, select **Start Mail Merge** > **Labels**, and choose your label vendor and product number. 3. Select **Select Recipients** > **Use an Existing List**, and choose the Excel file. 4. Click in the first label and select **Insert Merge Field**. Choose your address field. Add any other fields or text you want on each label. 5. Right-click each merge field, select **Edit Field**, select **Preserve formatting during updates**, and select **OK**. 6. Select **Update Labels** to copy the first label to all labels on the page. 7. Right-click each **«Next Record»** field, select **Edit Field**, select **Preserve formatting during updates**, and select **OK**. 8. Select **Start Mail Merge** > **Normal Word Document**. This disconnects the Excel file but keeps the merge fields. 9. Save the document as .docx. - Exact Forms Plus fills each merge field with the Quickbase field that has the same name. Word turns spaces in column names into underscores, so field names without spaces or special characters, like **AddressBlock**, are the safest. - The labels use the fonts and spacing of the template. Format the first label before step 6. ## Step 3: Add the template to Quickbase 1. In the **Document Templates** table, add a record. Give it a **Name**, for example *Customer labels*. 2. Upload the Word file to **Template File**. 3. In **clist**, enter the field IDs of the address table's fields that the labels use, separated by periods, for example `3.25`. You can also select them with the **EFP Configurator**. If the button uses a report (`msqid`), the clist is optional: the report's columns are used. 4. Save the record, and note its **Record ID#**. ## Step 4: Add the fields for the labels In the **Document Templates** table, add these fields: | Field | Type | Purpose | | --- | --- | --- | | **Mailing Labels** | File attachment | Stores the labels document. | | **Mailing Labels Date** | Date/time | Optional. When the labels were last created. | | **Mailing Label Template** | Checkbox | Optional. Lets you use a form rule to show the label fields only on label templates. | | **Create Mailing Labels** | Formula rich text | The button. See Step 5. | Put **Create Mailing Labels** and **Mailing Labels** on the form for viewing and editing. ## Step 5: Create the button Copy the start of the URL (up to `.aspx?`) from your **Generate EFP Document** button, and replace `doc_merge_ua.aspx` with `doc_maillabels_UA.aspx`. Then use this formula for **Create Mailing Labels**, with your own IDs: ```plaintext var Text url = "https:///doc_maillabels_UA.aspx?" & "request=" & Base64Encode("clientid=Q1234" & "&appid=" & AppID() &"&tpdbid=" & Dbid() &"&tpid=" & [Record ID#] &"&msdb=" & [_DBID_CUSTOMERS] &"&msqid=12" & "&mrgfn=Customer Labels" & "&docfmt=pdf" & "&mrgdbid=" & Dbid() &"&mrgrid=" & [Record ID#] &"&mrgfa=8" & "&mrgdte=9" ); "Create Mailing Labels" ``` | Parameter | What it does | | --- | --- | | `clientid`, `appid` | The same as on your other Exact Forms Plus buttons. Required. | | `tpdbid`, `tpid` | The template record. On a button in the Document Templates table, use `Dbid()` and `[Record ID#]`. `tpid` is required. | | `msdb` | The table with the addresses. Use its table alias. Required. | | `msqid` or `msqry` | Which records get labels: the report ID from Step 1 (`msqid`), or a query such as `{'10'.EX.'Active'}` (`msqry`). One is required. | | `mrgfn` | File name for the labels document, without the extension. Required. | | `docfmt` | `pdf` for a PDF. Leave it out for a Word document. | | `mrgdbid`, `mrgrid`, `mrgfa` | Where to save the labels: table, Record ID#, and file attachment field (**Mailing Labels**). Leave out `mrgfa` to only open the labels. | | `mrgdte` | Optional. The **Mailing Labels Date** field. | | `clist` | Optional. Overrides the clist on the template record. | The labels always open in the browser when they're ready: a PDF opens in the window, and a Word file downloads. They're also saved to **Mailing Labels** if you set `mrgfa`. One run creates up to 100 times your account's per-run document limit, which is 5,000 labels with the default limit of 50. ## Step 6: Try it 1. Open the template record and select **Create Mailing Labels**. 2. Check the labels that open. Close the window: the record refreshes and **Mailing Labels** has the file. 3. Print on your label sheets. Print at 100% (actual size), not "fit to page", so the labels line up. ## Print many labels for one record To print the same label several times, for example 10 labels for one shipment, add `num` to the URL. Exact Forms Plus takes the **first** record the report or query returns and repeats it. To number the labels (*Box 1 of 10*, *Box 2 of 10* …), put `~cnt~` in a Quickbase field that's on the label, for example a formula text field with `"~cnt~"`, and add `cnt` with the text to show before the number. Put `num` and `cnt` **after** the `Base64Encode()` part, as regular URL parameters. They don't work inside it: ```plaintext var Text url = "https:///doc_maillabels_UA.aspx?" & "request=" & Base64Encode( … same as above … ) &"&num=10" & "&cnt=Box"; ``` With a query in `msqry`, make it return the one record you want, for example `{'3'.EX.'" & [Related Shipment] & "'}`. ## If something goes wrong | What you see | What to check | | --- | --- | | *InvalidParams_Labels.htm* | A required parameter is missing: `clientid`, `appid`, `msdb`, `tpid`, `mrgfn`, and `msqid` or `msqry`. | | *A clist is required.* | The button uses `msqry`, and neither the template record nor the URL has a clist. | | *There were NO Master records returned to process.* | The report or query found no records. Check it in Quickbase. | | Labels are blank, or show *«AddressBlock»* | The merge field's name doesn't match a Quickbase field in the clist or report. Check the spelling, and avoid spaces in the field name. | | Only one label per page is filled in | The **«Next Record»** fields are missing. Redo Step 2, steps 6 and 7. | For other errors, see [Troubleshooting](https://help.quickbase.com/quickbase-extensions/docs/en/efp-troubleshooting).