logo
search
Office Settings & Configuration

How to Create and Track QR Codes in Microsoft Word

Phi Hung VoPhi Hung Vo Oct 1, 2026 869 views

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.

How to Create and Track QR Codes in Microsoft Word
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.
Before you start

Ensure you are using a desktop version of Microsoft Word that supports advanced field codes, and have your destination URL ready for tracking.

Solution 1Recommended

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.

1
Insert empty field brackets

Open your Microsoft Word document and press Ctrl + F9 on your keyboard to insert a pair of empty field brackets.

2
Enter the DISPLAYBARCODE formula

Inside the brackets, type the formula: DISPLAYBARCODE "https://your-trackable-url.com" QR \q 3 (replace the URL with your actual trackable link).

3
Toggle the Field Codes

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.

4
Adjust the QR code size

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.

Generate a QR Code Using the DISPLAYBARCODE Field
Scan Tracking Limitations: Word only generates the image. To track scans, you must use a third-party tracking URL or link management service as your destination link before generating the code.
Built-in QR Code Generator

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. 1. Open your document in WPS Writer: Launch WPS Office and open a new or existing word document.
  2. 2. Navigate to the Insert tab: Click on the 'Insert' tab located on the top ribbon menu.
  3. 3. Select the QR Code tool: Click the 'QR Code' button in the ribbon to open the generation dialog box.
  4. 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.
Built-in visual QR Code tool—no need to memorize or type complex field codes.Fully compatible with Microsoft Word document formats (.docx).Seamlessly insert and resize QR codes with just a few clicks.Lightweight, fast, and completely free to use for daily document tasks.
microsoft office alternative - wps office

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.