Quick Response or QR code is one of the easy ways to share information like a URL. There are many online tools available for creating personalized QR codes including the popular browsers like Chrome and Edge. You can also create a trackable QR code (tracking number of scans) using tools like Adobe Express. Although these methods are easier, you can create QR codes directly within a Microsoft Word document without using third-party add-ins. This allows you to embed your website information in the document so users can quickly scan and access it.
Using Field Codes in Word
In Microsoft Word, a field code is a set of instructions embedded in a document that tells Word to generate or update content automatically. Instead of static text, a field displays dynamic results based on underlying code. Creating QR codes in Microsoft Word using field codes is one of the most underutilized native capabilities of the application. Unlike add-ins or external generators, this method relies on Word’s built-in field, which can render machine-readable codes, including QR codes, directly inside a document.
Understanding the DISPLAYBARCODE Field
The DISPLAYBARCODE field is a specialized field code that generates barcodes based on input data and formatting switches. It supports multiple barcode formats, including QR codes. The basic syntax of the field is:
{ DISPLAYBARCODE "data" QR \parameters }
- The “data” argument represents the content encoded in the QR code like a URL, text string, or identifier.
- “QR” keyword specifies the barcode type.
- Additional parameters (also called switches) control error correction and rendering behavior.
Creating a Basic QR Code
To insert a QR code:
- Place the cursor where the QR code should appear.
- Press Ctrl + F9 to insert field brackets { }. Typing curly braces manually will not produce a functional field.
- Enter the field following code inside the brackets :
{ DISPLAYBARCODE "https://www.webnots.com" QR }
- Press Shift + F9 or Alt + F9 to update the field or right-click and select “Toggle Field Codes” option.
- Word will render a QR code representing the specified URL.

Note: Use Alt + F9 or Shift + F9 keys to toggle between the Field Code and QR code to inspect the syntax is correct. If the shortcuts are not working, use them with the Fn key like Fn + Alt + F9.
Error Correction and Scaling
You can use \q switch to define how much redundancy (Error Correction Level) is built into the QR code. The allowed values are:
- 0 = Low
- 1 = Medium
- 2 = Quartile
- 3 = High
Here is an example usage:
{ DISPLAYBARCODE "https://www.webnots.com" QR \q 3 }
High error correction is recommended for printed materials that may degrade. Similarly, use \s switch to adjust the scaling like \s 50, \s 100, or \s 150 (100 is the default scaling).

Note: Add \u switch to support Unicode characters like accented letters or symbols in the data.
Converting QR Code to an Image
There are multiple ways to convert the generated QR code into an image. The easiest method is to copy the code and go to “Home > Paste” and select the “Paste Options” as “Picture”. However, this will create a fullwidth image with lot of empty space as shown below.

If you want a correct sized image, follow the below steps:
- Open another Word document. Go to “Insert > Screenshot >Screen Clipping”.
- Capture the QR code from your original document as a screenshot.
- Now, you can copy and paste this image anywhere in Word or other apps.

You can also simply press Win + Shift + S keys to open the Snipping Tool app and capture the screenshot of your QR code from Word. Always open your phone’s camera and scan the QR code in your Word document to make sure it works correctly.

Final Words
Using the DISPLAYBARCODE field in Microsoft Word provides a native way to generate QR codes without external dependencies. It is especially effective for users managing templates and bulk documents where consistency and integration with other fields are required. While powerful, DISPLAYBARCODE has limitations as it lacks the advanced styling and logo embedding features available in dedicated QR tools. Additionally, this feature is limited to the Windows desktop version of Microsoft Word and is not available on macOS, the web-based version, or mobile applications.





