"Ads by Goooooogle" links provided by Google.com, which has sole control over all advertising content it displays on this site.

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

Barry MacDonnell's
Toolbox for WordPerfect

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

Page updated March 31, 2006
HSPACER - Converts normal spaces in selected text to hard spaces to prevent word wrap in phrases, legal citations, etc.

Download HSPACER.ZIP (v1.01; 07/13/04; 7,208 bytes)

For WordPerfect 8,9,10,11,12

This macro deletes ordinary spaces in previously selected text, and replaces each space or group of spaces between words with a single hard space ([HSpace]) to keep the words together on the same line. This prevents the words from being split between lines by word wrap.

There is no menu; simply select the text and play the macro.

NOTES:

HSPACER is meant to be used on short phrases, legal citations, etc.

If the selection extends beyond the end of a hard return [HRt] or paragraph end, the macro will stop processing spaces at the end of the line and exit. [The code to do this is in redline, and may be deleted if this limitation is not desired.]

However, HSPACER will allow you to select and convert pharses that have soft returns -- i.e., pharses that are word wrapped to the next line or page.

Note also that selecting too many words -- i.e., words that will not fit between the current margins after hard spaces are added between them -- will cause the remainder of the selection to be truncated following a temporary soft return. This is expected behavior: Hard spaces are meant to keep words from wrapping, and if all words joined with hard spaces cannot fit on a line, the line will be split and wrapped to the next line.

TIPS:

HSPACER may be more easily accessed by assigning it to a keystroke combination (such as Ctrl+1) and/or to a toolbar button.

HSPACER may also be useful in "marking" phrases for the author's UNIQUE macro. That macro creates a separate ("concordance") list of unique words in the document, which then can be edited to remove unwanted words and used to help index a document.

The macro's code demonstrates a method of processing just the selected text, on a character-by-character basis. When the processing reaches the end of the selection (marked with a temporary Quickmark), the macro terminates. The technique may be useful in other macros.