Microsoft KB Archive/24338

Word: Creating a Box Around an Entire Page Using PostScript

PSS ID Number: Q24338 Article last modified on 03-07-1997

=
========================================================= 3.00 3.01 3.02 4.00 5.00 5.10 MACINTOSH kbusage

= SUMMARY =

Word Versions 5.0, 5.1
The Page Layout glossary in Word 5.0 and 5.1 includes a glossary entry for bordering a page. You can add a border to a page by inserting the glossary entry for Page Border-Portrait or Page Border-Landscape as appropriate.

This functionality has changed in Word version 6.0 for the Macintosh.

Use the following procedure to add a border using the glossary entry:

  To border a single page, place the insertion point anywhere on the page. From the Edit menu, choose Glossary and clear the Standard Entries check box. To border every page of a document, place the cursor in a header (or footer.) From the Edit menu, choose Glossary and clear the Standard Entries check box.   From the File menu, choose Open. Select the Page Layout glossary (if it is not easily found, choose Find File to obtain a list of all glossary files on your system), and choose Open.   From the list of glossary entries select, Page Border - Landscape or Page Border - Portrait entry, and choose Insert. 

Word Versions 3.x, 4.0
To create a box or border around an entire page in Microsoft Word for the Macintosh version 3.x or 4.0, do the following:

  Insert the following PostScript code in the header for that page: % page borders 36 36 moveto 0 720 rlineto 540 0 rlineto -0 -720 rlineto closepath stroke   Select this code and apply the PostScript style to it by doing the following:   Hold down the SHIFT key and choose All Styles or Define All Styles from the Format menu. This will show you all of Word’s “automatic” styles in addition to the styles you’ve defined.   Select PostScript from the list. </li>  Choose the OK button. </li></ol> </li></ol>

= MORE INFORMATION =

The origin (0,0) in PostScript is the lower-left corner of the page. The coordinates are in point units (each point is 1/72 inch). PostScript first creates a path; you can then choose the stroke command. When you choose Showpage, PostScript will paint this path and print the text.

The following is a explanation of the commands in the PostScript program above:


 * 1) In the command “% ”, anything following a “%” (percent) sign is a comment and will be ignored by the PostScript interpreter. In this example, the comment is the text “page borders.”
 * 2) The command “x y moveto” will start at the origin (0,0) and move horizontally by “x” points, and vertically by “y” points. In this example, x is 36, y is 36.
 * 3) The command “x y lineto” indicates relative lineto. This command will start at the current position, move horizontally, and add a line segment to the current path. A positive number indicates “to the right” for x and “up” for y; a negative number indicates “to the left” for x and “down” for y. In this example, the first “rlineto” has “0” for x, 720 for y.
 * 4) The command “closepath” adds a line segment to the current path connecting the current point to the last point addressed by a moveto operator. It gives a clean mitered corner.
 * 5) The command “stroke” will paint the path created by the other PostScript commands.

For more information on PostScript, particularly the changes in Word version 4.0, query on the following word in the Microsoft Knowledge Base:

PostScript

KBCategory: kbusage KBSubCategory: kbformat Additional reference words: full whole macword macword5 3.00 3.01 3.02 4.00 3.0 4.0 ====================================================================== ============================================================================= Copyright Microsoft Corporation 1997.