Document Editing Problems

Print QR Codes in Word Documents and Mail Merge Labels

Steve KSteve K Nov 14, 2026 868 views

Question details

Add, position, resize, and print QR codes in Word documents and mail merge labels.

Product
Microsoft Word for Microsoft 365
Device & OS
not provided
Scenario
The user wants to place QR codes beside text in a document or create labels with recipient-specific QR codes.
Observed behavior
QR codes should fit the document layout, display the intended data, and print at a scannable size.
Before you start

Open the document in desktop Word and identify the URL or text each QR code should contain. For a mail merge, prepare a data source with a column containing the QR code data for each recipient.

Solution 1Recommended

Place and resize a QR code in a Word document

Use a borderless table to align a QR code with text and a DISPLAYBARCODE field to control its size.

1
Create a layout

Select Insert > Table and create a two-column table. Place the accompanying text in one cell and click the other cell for the QR code.

2
Insert the barcode field

On Windows, press Ctrl+F9 to insert field braces, then type DISPLAYBARCODE "https://example.com" QR \s 50 between them. Replace the example URL with your own QR code data; do not type the braces yourself.

3
Display and size the code

Right-click the field and select Update Field. The switch \s 50 scales the code to 50% of its default size; change the number as needed, with no space between the backslash and s.

4
Hide borders and test

Select the table and choose Table Design > Borders > No Border. Use File > Print to print a test page, then scan the code to confirm it works.

Use the size switch for QR codes: The \h switch controls barcode height but may not affect QR codes. Use \s to scale the QR code instead, and avoid making it too small to scan.
Free Microsoft Office alternative

Edit Word Documents with WPS Office

WPS Office is a free, lightweight alternative for working with documents in a familiar interface. Open compatible Word files and continue editing with an easy transition from Microsoft Office. Use Microsoft Word for the barcode field workflow described above.

Open and edit Microsoft Word DOC and DOCX filesArrange document text and images using tablesWork in a familiar, easy-to-use document interfaceUse a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why does the QR code size switch not work in Word?

Check the field code and make sure there is no space between the backslash and s: use \s 50, not \ s 50. Right-click the field and select Update Field after making the change.

How do I put a QR code next to text without visible table lines?

Use Insert > Table to create two columns, put the text in one cell and the QR field in the other, then select Table Design > Borders > No Border.

Can each mail merge label have a different QR code?

Yes. Store each value in a data source column and use its column name in a MERGEBARCODE field. For labels, select Mailings > Update Labels, then use Preview Results to check the records.

How can I check that a QR code will work when printed?

Use File > Print to print a test page, then scan the code with a phone or QR scanner. If it does not scan, increase the \s value and test again.