|
|
|
Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map |
|
Toolbox for WordPerfect |
||
|
Macros, tips, and
templates for Corel® WordPerfect® for Windows® |
Page updated Jan 18, 2008 | |
|
DeSpacer - A macro that reduces multiple adjacent
spaces to single spaces. |
|
|
Download DESPACER.ZIP (v1.06; 01/18/08; 23, 334 bytes) Compatible with WordPerfect 8-X3+ Downloading, Documentation, Modifications, and Support 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. The download ZIP file contains a WPD document (thanks to Don Codling) with various short phrases and sentences that have extra spaces in them. You can use it to see the effects of playing the macro. |
This macro will change this - 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 |