Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2021 by Barry MacDonnell. All Rights Reserved.

Page updated Jun 25, 2013

EDGETEXT - Place text, date, or filename outside the page margins

Download EDGETEXT.ZIP (v1.05; 06/25/13; 26,774 bytes)

Revised in WordPerfect X6 but should be compatible with WordPerfect 8 and later versions

WordPerfect 11 users: See important information about using macros in the first release of WP11 ( at the top of this page.

Downloading, Documentation, Modifications, and Support

Macros with a similar purpose:

DocStamp - A macro that will toggle the display of a user-specified document text stamp—such as "DRAFT" or "COPY"—on and off.

FilStamp - Places the filename at the bottom of FooterA or FooterB, or at the top of HeaderA or HeaderB, starting on page 1.

TextBord - Creates a page border composed of user-selected words.

See also: QuickWords for another way to insert items in a document.


The EdgeText.wcm macro can place a line (or lines) of text -- and (optionally) the date, the time, and/or the filename -- at one of eight places around the edges of the page, outside the page margins, on all pages or just specific pages.  [Screen shot]

This macro grew out of the question, "How do you automatically place text (or the date, or the filename) outside page margins?"


Download the ZIP file (screen left), and extract the macro from it into your default or supplemental macros folder. (See here for specific instructions.) 

Then play the macro. A menu of options will appear (screen shot). 

For Placement, be sure to choose the watermark (A or B) that is not otherwise used in the document; otherwise, it might interfere with that existing watermark. (You can ignore this choice if you just want the text box to be placed on the current page, since no watermark will be used in that case.)


Several formatting options are available. You can adjust or insert the following.

  • Placement: You can put the box on all pages (inside WatermarkA or WatermakB), or just on the current page (in a page-anchored text box).
  • Location: For the location of the box (always outside your current page margins) you have a choice: Top of page (left, center, or right side); middle of page (left side, right side); or bottom of page (left, center, or right side).
  • Offset: The box can be placed midway between the page margin guidelines and the physical edges of the page. (The default is to place it as close as possible to the edge of the physical page. In all cases, it is the top of the box that determines placement from the physical edge of the page.)
  • Flip contents: The left and right side boxes can have their contents flipped from the normal rotation.
  • Optional text: A sample text string is included so you don't get an empty box on the page. (This can be changed as described in Modifications below.) You can use up to 300 characters, including WordPerfect symbols. Additional options allow placing the text before or after any filename or date, using smaller or larger font sizes, various text attributes (including highlighting and redlining), and line spacing. 
    • Starting with v1.05 you can use the Enter key to add more than one line of optional text. Obviously, this might push text into the main body of the document, unless you adjust the adjacent page margin and/or use a smaller font or line spacing.
  • Filename: The filename, with or without the path, can be inserted.
  • Date and time: You can have the macro enter the date as a dynamic code (which lets the date change to the then-current date when you load the document at a future date) or as a static text string (which keeps the date the same as the creation date -- unless, of course, you play the macro again to update these items). Optionally, you can add the current time as a code or text string.
    • You can also modify the macro (see below) to force (1) a specific date/time format and/or (2) put the date/time on the next line under the other items.
  • Border: A border can be added. This might be best used with the left, right or top/bottom center locations. If you omit the optional text and date, a blank (empty) box with a border will be created, which might have various practical uses.
  • You can modify the default choices for these menu (and other) items as described in Modifications below.

Always print a test page to ensure the text box doesn't extend into your printer's non-printing area. (It should not, but If it does you can change page margins to a narrower setting and/or choose a greater distance "offset" from the edge of the page for the text box.) You might also want to verify the overall "look" of the box. You can do this easily with File, Print Preview.

Operation, box editing, and box removal

Depending on your menu selections, the macro will either use a text box inside a watermark (to make it appear on all pages) or it will place the text box on an individual page ("On current page only").

You can edit the watermark-type text box by editing the watermark (double-click on its code in Reveal Codes or use Insert, Watermark, A or B, Edit), then by clicking on the text in the watermark to open the text editing screen. When you have finished, close the text editing screen and then close the watermark editing screen.

The watermark-type text box can be deleted by simply deleting the [Watermark] code in Reveal Codes; the page-type text box can be deleted by locating the [Box] code in Reveal Codes and deleting it (you can also just drag it from Reveal Codes).


  • If you choose one of the two watermark options, any pre-existing watermark of that type (A or B) in the document will be superseded. However, if the pre-existing watermark of that type (A or B) is further down in the document it will take over from that point, so your stamp might not appear from that point forward. [This normal for such items. For more on how watermarks operate see "Headers, Footers, and Watermarks - how to start, stop, suppress, edit, change, replace, delay, overlay, and remove them".]
  • If the box is placed on the current page only the [Box] code might be located inside a [Delay Codes] code; if so, go to the page where the [Delay Codes] code is located and delete it. [If you click on the code you should see it labeled [Delay Codes: [Box]].]


  • You can create multiple text boxes in the document, some on all pages (use one or both watermark Placement choices) and some on specific pages (use the "Current page only" choice) -- and each can be in a different location. Or navigate to a page, use "Current page only" to create a box, navigate to another page, and add another box, etc.
  • Once a customized box is created it can be used in a QuickWord for future documents. This makes it easy and quick to use again. Just select the [Watermark] or [Box] code and create a QuickWord from it.
  • If you need a blank box, select "Create the text box with a border," and do not enter any text or select a filename or date.
  • It may be easier to see these effects by practicing on a copy of your document or on a blank document.
  • You can generally Undo any changes with Edit, Undo (or Ctrl+z).
  • If you wish to use the macro to modify a WordPerfect legal Pleading document with a text stamp, be sure to choose Watermark A on the macro's menu. Pleadings use Watermark B. See "Modifying the legal Pleading feature" for more information.


Default menu choices can be changed through the redlined User Modification Area at the top of the macro's code. Once you have put the macro in your macros folder (see instructions), click on Tools, Macro, Edit and open it for editing. Make the desired changes following the instructions in the modification area, and then click Save & Compile on the macro toolbar.

Recent history

v1.05 (6/24/2013) - Added ability to use multiple lines in "Optional text" field in the menu dialog. Added option to set line spacing for any optional text used in the text box.

v1.04 (03/02/2012) - Added option to insert the current time (as a code or a string). Forced dates and times to the formats specified in the User Modification Area. Allow date/time to be placed on the next line. Minor format changes. v1.04.01 - Added routine to open Reveal Codes during macro play.

Page Top