|
Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate |
|
Toolbox for WordPerfect |
||
|
Macros, tips, and
templates for Corel® WordPerfect® for Windows® |
Page updated Sep 1, 2009 | |
|
DeSpacer - A macro that reduces multiple adjacent
spaces to single spaces. |
||
|
Purpose This macro changes text like this: "Once
upon a time, " Background In some documents, adjacent (i.e., contiguous) spaces may have format codes embedded in them, which can present a problem for traditional Find and Replace procedures (e.g., using Edit>Find and Replace to find two spaces and replace them with one space). Using Find and Replace to replace multiple spaces with a single space will remove some (but, curiously, not all) embedded codes, which is something that you probably do not want. Also, after you delete text or cut-and-paste text to other parts of a document, you could end up with something like this in your document (where <s> indicates a space character):
Unlike some other macros or Find and Replace methods, this macro won't delete any codes found between space characters. Using this macro, the above line would be processed and look like this in the Reveal Codes window:
Additionally, any misplaced spaces adjacent to WordPerfect format codes can be relocated (menu option). For example -
The Despacer macro can also delete unwanted single spaces adjacent to certain codes (e.g., [HRt], [HPg], [HCol], [Cell], [Table Off], [Col Def: Off], [Left Tab], etc.) to help "clean up" the document. There may be some (rare) situations where the macro will not remove all such solitary spaces; therefore, a visual inspection may be required. You can set these options off to leave such spaces alone, and also turn the menu off to speed operation. See the top of the macro's code for instructions. Tips
Notes
|
|
| Disclaimer, Distribution, and Privacy Policies | ||