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-2024 by Barry MacDonnell. All Rights Reserved.

Page updated Jul 15, 2019

TEXTBOX - Create "rounded" and "overline/underline" text boxes around words or phrases

Download TEXTBOX.ZIP (07/15/19 19,285 bytes)

Compatible with WordPerfect 8 and later versions

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

Downloading, Documentation, Modifications, and Support


Related items -

•  LetrBox - Two simple macros that create a small box with rounded corners around a letter, number, or other character -- including symbols (one macro provides normal text, the other creates a reverse color box).

•  Box2Text -
A macro that moves all text inside each text box in a document to the current box's position in the document, then deletes the empty box. Options let you pause the macro at each item for confirmation, etc.

•  Attaching graphic images: How to keep a graphic image or text box from "jumping around" on a page or moving to another page (plus: how to group images)

•  Several ways to "stamp" labels or other useful information on each page (or a range of pages) of a document with headers, footers, text boxes, etc. See here.

•  WordPerfect X7 comes with a new macro, SendToTextBox.wcm. It "moves the currently selected text into a [borderless] character-anchored text box". Select the text and type the macro's name in the Play Macro window (see Tools, Macro, Play). Right click to rotate Content, change Position to Page, etc. [For more on attaching graphics and text boxes to a character, paragraph, or page see here.]


Contains two macros -

TextBox.wcm (v1.02)

A macro that creates a box with rounded corners around document text, like this:


Operation:

•  If you selected some text before playing the macro the resulting box is placed at the current insertion point in the document, with its Position attached to Character so that the box will move along with its surrounding text if you add or delete material above it in the document.

•  If you did not select some text first, a dialog pops up to allow you to enter your text manually, and the resulting box "floats" on the page so that it can be resized and moved (dragged) to a desired position.

Undo it:

•  You can reverse the creation of a box by immeidately using Ctrl+z (typically by using those keys twice in a row).

•  You can also convert existing boxed text back to normal document text with the Box2Text macro in the Library. That macro has options to let you remove formatting from the boxed text, pause at each text box found to get your confirmation, and add redline and/or italics to the converted material. (Using redline or italics allows for further processing, if desired, such as with the ReplaceCodes macro.

Modify it:

•  You can make some modifications to the box in the redlined areas of the macro's code, such as text size, border style, spacing between the border and text, the degree of the corner rounding (radius) or remove the rounding, and the type of fill (percentage or style) and fill color (the default is white). It is fully annotated so that you can adjust default values. See the instructions at the top of the macro's code.

Advantages:

•  While WordPerfect has some features to enclose paragraphs and pages with border lines, as well as its own Text Box feature, the TextBox.wcm macro allows you to "box" fewer text characters,such as a word or phrase, and with one that has rounded corners. [In WordPerfect if you simply select some text and click Insert, Text Box -- or click the Text Box toolbar icon -- the selection will be inserted automatically in a text box, but it will not have the rounded corners that this macro gives you without making some manual adjustments.]

•  You also can use this macro to place floating box labels in a document with connecting lines (thereby creating "callouts"; also see the tip on drawing arrows on the Tips page).

Alternatives:

See WordPerfect's shipping macro, REVERSE.WCM which produces rectangular boxes with white text on a black (or colored) background.

Also see LETRBOX.

TextBox2.wcm (v1.0)

A macro that creates a text box with a thin top and bottom border (just the two horizontal "lines": no side borders) around previously selected text. The box has minimum inside and outside dimensions, so you can play it on words in a line of text.

While WP has a feature to enclose paragraphs and pages (Format, Paragraph [or Page], Border/Fill), this macro allows you to "box" fewer text characters -- even a single character.

Instructions:

Select some text on the page and play the macro.

Notes:

The resulting boxed text will be attached at the current insertion point as a character. This will keep the text at the same place on the same line. (Graphics can be attached to a Character, Paragraph, or Page.)

Text box attributes and absolute positioning can be edited later (right-click on the box). They also can be moved to another position.

To move a text box assigned as a character, you can cut (Edit > Cut) the box from the document and paste it (with Edit > Paste) to another location.

However, if you want to drag it you will need to change its position first: Right-click it to bring up the context menu. Select Position, then "Attach box to...Page". You will now be able to drag the box using the Windows four-headed drag arrow symbol. (Or, choose Position from the context menu to set a specific position and attachment type.)

You may be able to use a different border or different spacing between the borders and the inside and outside areas. See the redlined code in the macro.