How to Create and Track QR Codes in Microsoft Word
Question details
The user wants to generate a QR code directly within a Microsoft Word document and find a way to track its scan metrics.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Generating scannable QR codes for printed or digital documents and monitoring user engagement and scan counts.
- Observed behavior
- The user needs the correct field code syntax to insert a QR code and requires a reliable method to enable campaign analytics for the generated code.
Ensure you are using a desktop version of Microsoft Word that supports advanced field codes, and have your destination URL ready for tracking.
Generate a QR Code Using the DISPLAYBARCODE Field
Create a static QR code directly within your Word document using built-in field codes.
Microsoft Word allows you to generate various barcodes and QR codes using the DISPLAYBARCODE field. While this feature creates the visual code, it does not natively track scans. Tracking requires the URL embedded in the code to be inherently trackable, such as a link with UTM parameters or a URL shortener.
Open your Microsoft Word document and press Ctrl + F9 on your keyboard to insert a pair of empty field brackets.
Inside the brackets, type the formula: DISPLAYBARCODE "https://your-trackable-url.com" QR \q 3 (replace the URL with your actual trackable link).
Right-click the text you just typed and select "Toggle Field Codes", or press Alt + F9. The text will transform into a scannable QR code image.
If you need to resize the QR code, you can add scaling switches to your field code, such as \s 50 to scale it to 50 percent.

Use a Third-Party QR Code Service for Advanced Analytics
Use a dedicated QR code platform to generate dynamic, trackable codes and insert them as images into Word.
Generate QR Codes Easily with WPS Office
Instead of memorizing complex field codes, WPS Office allows you to create and insert QR codes directly from a visual interface. It is a lightweight, highly compatible alternative for all your document creation needs.
- 1. Open your document in WPS Writer: Launch WPS Office and open a new or existing word document.
- 2. Navigate to the Insert tab: Click on the 'Insert' tab located on the top ribbon menu.
- 3. Select the QR Code tool: Click the 'QR Code' button in the ribbon to open the generation dialog box.
- 4. Enter your URL and insert: Paste your trackable URL into the text box, adjust the sizing if necessary, and click 'OK' to instantly place the QR code directly into your document.

Frequently Asked Questions
Can I track a QR code if I link it directly to my website's homepage?
No, linking directly to a standard URL will not separate your QR code traffic from other visitors. To track scans accurately, you need to append UTM parameters to your URL or use a dedicated short link with analytics tracking.
Why is my DISPLAYBARCODE field showing text instead of a QR code image?
You are likely viewing the raw field codes instead of the calculated results. Press Alt + F9 on your keyboard to toggle the view from field codes to the actual barcode or QR code image.
Does the DISPLAYBARCODE feature work in Word for Mac?
The DISPLAYBARCODE field is primarily supported on Windows versions of Microsoft Word. Mac users may find this feature missing or unsupported, and usually need to rely on inserting pre-generated QR code images from third-party tools.
Are the QR codes generated by Word dynamic or static?
Microsoft Word generates static QR codes. This means the destination URL is permanently hardcoded into the visual pattern. If you need to change the link destination after printing, you must use a dynamic QR code generated by a third-party tracking service.




