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

Page updated Sep 2, 2009

REPLCHAR - Replaces characters in a word or phrase with underscores (or other characters) to create fill-in forms, student tests, etc.

Download REPLCHAR.ZIP (v1.03b; 05/09/07; 7551 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

Replaces each character in previously selected text with two underscores plus a space. Useful in creating fill-in forms, student tests, etc.

For example, if you select a phrase in your document such as "TWO ATOMS" the macro will convert it to
__ __ __    __ __ __ __ __. You can easily customize the macro by changing the settings in the User Modification Area at the top of the macro's code. You can change the replacement character, skip spaces between words (the above example would then contain eight double-underscores without a space between them), etc.

The macro is an example of a method to process previously selected text on a character-by-character basis. The While/Endwhile code used to process characters may be useful in other macros. Note also the alternative code provided by Roy Lewis at the end of the macro.