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

Page updated Sep 2, 2009
Macros that produce a short signature or other "fill in" line

                                like this;

or a line up to the right margin, like this:                                                                   

or centered text between automatically adjustable lines like this:

                                                           TITLE
                                                         

Download UNDERLIN.ZIP (v1.01; 11/04/05; 16,025 bytes)

Compatible with WordPerfect versions 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

The following macros are based on a combination of WordPerfect features you can use yourself:

(1) Format, Font, Underline tab, Text & Tabs (or Format, Font, Underline, Text & Tabs in WordPerfect 8);

(2) Format, Font Underline

(3) Format, Line, Flush Right or Format, Line, Center.

However, you might find these macros more useful, since they are fast, easy to use, and also reset your current setting for underlining in (1).

The ZIP file contains three macros:

  • UnderlineTab.wcm (v1.01) - A macro that creates an underlined tab. Each activation produces another underlined tab, up to the right margin. Useful to quickly create a signature line or similar short line below the text's baseline.
    • Note that you can create the tabbed underlines and then type over them. They will expand rightward as text is added past the next underlined tab. (Use Reveal Codes to see what is going on at the cursor location.) The main purpose, however, is to create a signature line that will be used as such on the printed copy.
  • Underline2Margin.wcm (v1.01; revised 11/03/05) - A macro that creates an underline from the current position to the right margin (i.e., the end of the current line) to "fill" the space with a line, then optionally enters a hard return [HRt] and (optionally) returns the cursor to the starting point. This allows the line to automatically expand or contract if previous text is edited.
    • Underline2Margin was designed to work with body text. It does not work properly inside paragraph styles such as Heading 1, Heading 2, etc. If played in a paragraph style it will underline everything in that style.
    • New in version 1.01:
    • If the new underline is created on the last line of a page, it will not cause a new page to be generated. [Any (optional) hard return at the end of the underlined area is removed.]
    • If you do not want the cursor to return to the beginning of the current underlined area, and/or you do not want a hard return entered at the end of the underlined area, you can change these defaults in the macro's redlined User Modification Area.
  • Underline2Center (v1.0; created 11/04/05) - This macro creates a "expandable underline" from the current cursor position (usually, the beginning of a new line) to the center position (i.e., between both margins) and thence to the right margin (i.e., the end of the current line). It then optionally enters a hard return and returns to the center of the ine, where text between the underlines is entered via a pop-up dialog (the dialog itself can be suppressed). It is useful in creating unique section headings and similar items, especially since the lines adjust automatically to the width of the centered text.
    • If the new underlines are created on the last line of a page, it will not cause a new page to be generated. [Any (optional) hard return at the end of the underlined area is removed.]
    • If you do not want a hard return entered at the end of the second underlined area, you can change this and several other defaults in the macro's redlined User Modification Area.
    • TIP: Once the item is created, you can add text to the very beginning and/or very end of the line by moving the cursor (in Reveal Codes) before the first [Und] code and/or after the last [Und] code. This produces left-center-right text joined by underlines.

These macros "remember" your default settings in Format, Font, Underline and restore them immediately after either macro plays.

The macros can be assigned to a toolbar button or keystroke combination. The author uses the text property bar to hold two buttons, and , which play the first two macros with a mouseclick. (Note that the text property bar might be replaced by another property bar, depending on what you are doing at the time. Therefore, you may want to use the standard toolbar rather than a property bar for the two buttons.)

To use the sample (16 x 16 pixel) icons above on your own system -

  • Edit your toolbar or property bar and create buttons to play the macros:
    • Right-click the toolbar or property bar where you want to place the buttons.
    • Choose Edit from the drop-down context menu, then click the Macros tab, then click the Add Macro button.
    • Choose the name of the macro from the file dialog that opens. Click Select.
    • Generally, you can answer "No" to "Save macro with full path?" if the macro is in your default or supplemental macros folder. If it is not, answer "Yes."
    • A gray "audiocasette" icon appears on the right side of the toolbar or property bar.
    • With the tool- or property bar's Editor dialog still open, right-click the new icon to open the Customize Button dialog. Customize the icon with some descriptive text and a tool tip.
    • Click OK twice to return to the main document window.
    • Repeat the above steps for the other macro.
  • Next, change the button's icon. Place your cursor over an icon above (on this web page) and right-click your mouse. Select "Copy" from the Windows context menu to copy the icon from this web page to the Windows clipboard.
    • Note: If you are using WordPerfect version 10.0.0.663 (also known as service pack #2), be aware that the icon editor was broken by Corel with that service pack (it was fixed in WP10.0.0.719, a/k/a SP3). Click here for a workaround to use instead of the next steps.
  • Open WordPerfect and right-click the toolbar that has the new audiocasette button whose image you want to change. Select Edit from the drop-down context menu, then right-click the appropriate button, then select "Customize." This will bring up the Customize Button dialog.
  • Click the "Edit" button on the Customize Button dialog to bring up the Image Editor.
  • In the Image Editor, click "Clear," then "Paste" to paste the new image from the Windows clipboard. Make any needed adjustments, then click "OK" until you are back in the document window.