Applies ToWord for Microsoft 365 Word for Microsoft 365 for Mac Word 2021 Word 2021 for Mac Word 2019 Word 2019 for Mac Word 2016

The Print field sends printer-control code characters to the selected printer. Microsoft Word displays a result only when the document is printed. For appropriate printer codes, consult your printer manual.

Note: The Print field works well with a PostScript printer or a Hewlett-Packard LaserJet printer, but it may not work properly with another type of laser printer. The Print field works with a dot-matrix printer only if the printer supports the PassThrough command.

Syntax

When you view the Print field in your document, the syntax looks like this:

{ PRINT "PrinterInstructions" }

Note:  A field code tells the field what to show. Field results are what’s shown in the document after having evaluated the field code. To toggle between viewing the field code and the field code results, press Alt+F9.

PostScript commands

You can send PostScript programming strings to your printer by inserting Print fields in the document text. Word sends the commands to the printer as native PostScript codes. PostScript commands embedded in your document are carried out in the order in which you insert them. Use the following syntax:

{ PRINT \p Group "Codes" }

The y-coordinate space used for PostScript commands in Word is the same as for normal PostScript. The graphics origin (0,0) is in the lower-left corner of the page, and the positive directions are up and to the right. PostScript drawing instructions take place within a drawing rectangle. The graphics origin is translated to the lower-left corner of the drawing rectangle.

Instructions

\p Group

Defines the drawing rectangle that the subsequent PostScript instructions operate on.

"Codes"

PostScript instructions. If the instructions contain more than one word, enclose them in quotation marks.

Note: To print PostScript over text, click the File tab, click Options , click Advanced, and then select the Print PostScript over text check box under When printing this document.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.