| WP version (compatibility)
|| Descriptions / Downloads
Documentation, Modifications, and Support
Other macros by Ron
WordPerfect 11 users: See important
information here about using macros and some templates in the first
release of WP11 (22.214.171.124).
Ron Hirsch has graciously contributed these macros.
Download REPLACE.ZIP (01/24/18; 55,7565
Replace Codes - Plus
has been modified by Barry MacDonnell with Ron's permission.
Contains 3 macros:
Replace Codes - Plus.wcm (v1.04)(Minor update 01/24/18) for
WordPerfect versions 9 and later
processes WordPerfect styles)
Codes - Plus.wcm (V1.01) for WordPerfect
versions 8-12 (does NOT process WordPerfect
font size via menu.wcm (see below)
|REPLACE CODES - PLUS
Replace Codes - Plus.wcm is a macro that
can change, augment (i.e., add to) or remove
font attributes such as -
- double underline
- small caps
"This macro allows the user to
modify the font attribute codes of bold, italic, underline, double
underline, strikeout, shadow, small caps, redline ... and also add,
replace, or remove highlighting in a document. Codes can be turned off,
added to, or deleted. While it is possible to do code deletions via
WP's search and replace feature, changing codes in a large document can
be a long and arduous task without the use of a macro to do the work."
can change all underlines to italics (or vice versa),
or all bold words to bold
underlined redlined words, or add
to all (or some) words to which an
attribute was already applied. (For strikeout and Redline, see the related tip below.)
□ (Version 1.02:) You can replace (for example) bold
attributes with a custom Character style, to make it easier to
change the style's attributes later throughout the document by changing
any one instance of the style. (For more on styles, see here.)
□ You can (optionally) delete the text between the chosen
codes (useful for removing "draft" text or other annotations).
[But see the caution below,
which describes accidentally deleting other codes -- such as bookmarks
-- that might exist between the paired format codes above. It applies
to any global simultaneous removal of paired formatting codes and text.]
See the sample
screen shot of the menu. Options allow you to -
start at the top of the document or the current cursor location;
• pause and prompt for each change;
• work inside headers, footers,
footnotes, and endnotes; and/or
• delete both the chosen item's codes and
the text between them. (But see caution below.)
☼ Codes located inside styles, text variables, or delay codes cannot be replaced/augmented with this macro or even with WordPerfect's Edit, Find and Replace.
This is a design limitation of WordPerfect (at least in recent
versions): Searches (manual or macro) cannot see inside code
- See the tip about File, Document, Remove Markings under the Strikeout and Redline section below.
- You can edit the [Style] or [Delay] code by double-clicking on the code in Reveal Codes, then remove the specific codes.
- Alternatively, you can replace
styles that contain unwanted codes with a different style (or just
remove the styles) using a macro such as ReplStyl.
- Or you can (e.g.) remove the
styles but leave their included format codes behind with Format,
Styles, <choose the style>, Options, Delete, "Leave formatting
codes in document," OK.
in version 1.02 (for WP9 and later versions
only) is the ability to apply a style to replace an existing format
attribute. For example, you could replace highlighted text with a
custom style (that may also contain highlighting).
style can contain more than one format attribute -- a style is like a
container of several formatting codes and/or text -- this may be useful
under a variety of circumstances. Plus, once you apply a style, it is
easy to change the "look" of the style wherever it appears by simply
changing one instance of that style.
If you later need to replace the new style with another
style, you can use the REPLSTYL
macro. (REPLSTYL can also remove a style.) You can also include codes
in a style to mark the style (thus,
any instance of it in the document) for inclusion in a Table of
applying styles to replace format attributes:
you want to use must exist in the current document. When asked, be sure
to enter the name EXACTLY as it appears in the document's Style List
(on the text property bar, or shown in Format, Styles).
be either Paragraph or Character. However, Paragraph styles will affect
the entire paragraph to which they are applied, which may or may not be
what you want. (They should work well if the original formatted
selection was also a paragraph.)
styles will affect only text bracketed by the pair of format codes that
you chose from the main menu's left group, and probably are the most useful.
Document ("open") styles will not work properly in this macro since
they have no ending codes; therefore, use only Paragraph or Character
enable the "Stop at each item..." option on the dialog that appears
when you choose to appply a style (or if you choose the 'Prompt...'
option from the main menu) you will see the effects of applying the
style to a particular item; if you don't like the result, you can Quit
at that point. Any changes can be undone with Edit, Undo.
☼ Applying highlighting
WordPerfect X4+ users (Update: July 2008): If you use Tools,
Redaction during draft document creation, Redaction codes ([Redact:Mark])
will be inserted in the document. These appear to act like (gray)
highlighting and they might be removed if highlighting is applied, or if [Highlight]
codes are removed globally. Be careful when applying (or removing)
highlighting in such a document. You don't want to accidentally remove
"markers" for text that should be redacted. It is better to convert the document
to a redacted version first. For more information about this issue and
some macro code snippets, see this PDF
highlight color (bright yellow) used by the macro when adding
highlighting is coded into the macro at about line 36 with the command,
HighlightColor (Red: 255; Green:
255; Blue: 0; Shade: 100). If you remove or comment out this
command ("//"), you'll be able to preselect any highlight color before
playing the macro. In the same vein, you can set some other default
color for the macro to use by changing the command's parameters (color
values can be 0-255; shade values are 0-100).
Tip: To replace one
highlight color with another wherever it occurs, simply play the macro
and replace all existing highlighting in the document with something
you aren't using in that document, such as the Shadow font attribute.
Then set the new highlight color on the toolbar and play the macro
again, replacing all Shadow attributes with highlighting. Or, you could
use HILITERC (included in HILITE.ZIP)
to change the color of existing highlighting in a document.
☼ To change attribute codes
to text markers, see CODE2TXT,
a macro that changes text surrounded by attribute codes (e.g., [Bold
On][Bold Off]) to text surrounded by user-defined text markers (e.g.,
<B></B>), such as HTML tags, Folio markup codes, Ventura
☼ To change or augment existing multiple text attributes or other formatting applied to certain words or phrases in the document, such as changing italicized redline to Arial 10-point bold, see Footnote 2.
☼ To apply format attributes to specific words throughout
the document in one pass:
For macros that can find specific words/phrases anywhere they appear in the
document and add a font attribute (e.g., italics or redline) to all of them, see
the footnotes here.
☼ Strikeout and redline font
attributes are paired format codes (an "On" code and an "Off" code) that are typically
applied from either the Format, Font menu or from a button on the Text property bar. [To apply them with a shortcut key see this tip on the main Tips page.]
[Side note: These two font attributes are NOT the same
thing as deletions and insertions created with
File, Document, Compare/Review -- even though they may look the same on
The Compare/Review feature (which is not available on some editions or
early versions of WordPerfect) produces deletions and insertions using
codes, which work differently from the ordinary redline and strikeout
attributes discussed here. Hence the Compare/Review codes are not processed by this macro.]
You can use WordPerfect's own File, Document, Remove Markings to
[A] remove redline codes, along with both Strikeout codes and the text to which strikeout was applied;
[B] remove only strike out codes and the text to which they were applied.
However, unlike the Replace Codes - Plus macro above there is no option to pause
at each item to ask for confirmation -- something that might be desirable. The feature works globally on the
document, not on individual redline and strikeout items.
Be aware that when using these two WordPerfect methods to remove Strikeout text they can also remove some other codes -- including bookmarks [see Tools, Bookmark] -- that might
exist in the strikeout text area
(i.e., between the pair of StkOut codes).
Therefore use this method
with caution. In fact it might be better to inspect these strikeout areas in
before manually removing their text, rather than remove them with the WordPerfect Remove Markings feature.
are the first two
choices on the File, Document, Remove Markings dialog; the other two
choices relate to the
Compare/Review feature which, as noted above, is a completely different
feature (and not present in all editions of WordPerfect).
Using that dialog's choices to remove text can leave unwanted spaces behind in the text's location. (The DeSpacer macro
can remove extra spaces later.)
Thus, you might prefer using the
Replace Codes macro and enable the option to "Delete the chosen
attribute and all its formatted text."
[However, the same caution above -- about inadvertently removing some other format codes when using the delete option (last menu checkbox) -- applies.
Using that option to delete BOTH the format code(s) AND the text to
which the formatting was applied is easy and generally without issues.
(You wanted to delete all the material, right?) But be aware that any embedded formatting will ALSO be deleted -- including bookmarks
(see Tools> Bookmark). This might -- or might not -- be important to
you, so consider searching for bookmarks to see if any are important
enough to relocate or re-create.]
REPLACE FONT SIZE VIA MENU
Font Size via menu.wcm (v1.01; 04/13/06) (part of Replace.zip above)
This macro has two basic operations:
(1) It changes one font size
to another size, or
(2) it removes the specified font size throughout the document.
Note that #1 works on paired
[Font Size] codes, not on codes that may be part of (i.e., embedded in) the document's
initial style (or other style) or in the default template.
Note: Paired font
size codes are applied whenever you select some text and change the
font for that selection to a new font size (that is not the default size in the document template).
version 1.01: You can specify decimal sizes
(e.g., 11.5). Just type the decimal size directly into the appropriate
Tip: To replace multiple instances of one font type (e.g., Times New Roman) with
another font type (e.g., Arial):
[From Jan Berinstein on WordPerfect Universe,
With the cursor at the very
top of the document, invoke Find and Replace. Click the "Type" menu at
the top of the F&R dialog box, then click "Specific Codes." In the
sub-dialog that appears, click "Font," then "OK." You should be able to
use pull-down menus to instruct WP to replace [the first font] with
[the second font], and then click "Replace All." Be sure to repeat the
process at least once, since I've found that it sometimes misses a few
instances on the first pass.
[Back to Top]
[Back to main Library]
OTHER MACROS BY RON
AUTORUN2.ZIP - (05/30/03; 4,987 bytes) - AutoRun2 is a macro that offers
a FILE>OPEN window and plays some user-specified macro code
automatically when a document is opened. See the instructions at the
top of the macro code.
CLEANUP.ZIP - Contains a macro to clean up e-mail messages copied into
WordPerfect. The macro removes hard returns within paragraphs (so that
they will wrap properly), line breaks, extra spaces, ">" and "<"
symbols, etc. See the comments at the top of the macro's code. Uploaded
11/1/99; 4,083 bytes. See also FixMsgs
in the Library, which offers similar capabilities.
FORMFILL.ZIP - A macro to facilitate filling in preprinted (paper) forms
using WP and your printer. Useful if you need to fill in the same form
many times. See also "Filling in forms
using WordPerfect". Uploaded 9/1/02; 30,934 bytes. (Works in
WP10.0.0.719 - Ed.)
GREENBAR.ZIP - Contains a WP 8+ macro that
formats tables to mimic 3-row "green bar" fanfold paper using gray
table cell fills that alternate every 3 rows with no fills. Uploaded
2/16/00; 7,711 bytes. See also RowLines
in the Library.
GRIDS.ZIP - A macro that generates various watermark grid designs in
a watermark. Great for quickly printing sheets of graph paper as well
as setting up a grid under body text. The user can set up whatever grid
sizes and rows/columns that are desired; lines and fill areas can have
colors selected by the user. Uploaded 10/27/00; 10,134 bytes.
MACROTIP.ZIP - Macro Tips and Tricks. A
short WP document to help beginners write their own macros. Uploaded
2/21/00; 8,107 bytes.
MACROS_2.ZIP - More Macro Tips and Tricks. Contains 4 files, a WPD and 3
WP8/9 macros. According to the author, "These files are the basis for a
learning experience in WP for macros and dialog boxes. The 5-page
document details the exact procedure for recording a simple macro. It
then provides the steps necessary to construct a dialog box in that
macro. Each step of the way is clearly presented, with commentary where
applicable. The three macro files are stages in the construction of the
final macro which is the third macro file. This final macro is
complete, with numerous notes, and commentary contained within the body
of the macro." Uploaded 2/25/00; 22,289 bytes.
SPECPAPR.ZIP - "Special Paper
Sizes" (Rev 5d) - A WordPerfect 8/9 macro by Ron Hirsch that fools WP
and your printer into accepting any paper size. Cures problems with
some printers that can't properly print special size pages. Uploaded
12/11/01; 20,547 bytes. Not tested under WP10 but should work in that
Back to Top]
[Back to main Library]
| 6-12 (but most should work in later versions)
Note: These macros are in the public domain
and are not supported by the Toolbox for Wordperfect.
Over 160 WordPerfect for Windows macros in a
ZIP archive file. Documentation included.
JLMACS80.ZIP (963,987 bytes) - For WordPerfect 8 - but many (if not
most) will work with WordPerfect 9+. Originally published on
CompuServe. Dedicated to
the public domain by John Land, Esq. Thanks, John!
Note - If you
aren't sure if these macros are for you, you can download the JLMACRO.WPD document or read it here online.
- One of the most useful macros in John's
collection is #WATERMK.WCM, which
- "inserts a stamp vertically in
the left margin [or any of 8 other locations] using Watermark B.
Includes DRAFT, REDLINE, RESPONSE REQUIRED, RESPONSE OPTIONAL,
INFORMATIONAL ONLY, CONFIDENTIAL, COPY, SECOND COPY, and SAMPLE, you
can also specify your own, including point size and gray shade. The
general position on the page and rotation (in 90 degree increments) can
be specified." [See screen shot.]
- Tip: Once the watermark stamp
is created it can be edited by double-clicking the [Watermark] code in
Reveal Codes, then double-clicking on the [Box] code that contains the
stamp. You could add a date or other information to the stamp.
- See also DocStamp.zip here.
- Another good example of John's work is #FIX.WCM (FIX
- Fix line endings by removing
occurrences of extra spaces before or after a carriage return codes,
page codes, table cells, etc., and fix the endings of footnotes and
endnotes to delete unwanted spaces, HRt codes, tabs, and indents.
- Delete excess HRt codes to at most 2
in sequence. [See also DelExtraHR.wcm
included in DelCodes.zip.]
- Change single HRt codes to spaces
(useful for cleaning up imported ASCII text files); leaves alone a
sequence of HRt codes separating paragraphs [See also LineWrap.wcm here.]
- Change typewriter "quotes" to "fancy"
printers quotes (a/k/a typographical quotes). [See also ConvertQuoteMarks.wcm included in QC.zip.]
- Deletes "empty" attribute pairs in a
document (e.g., [UND][und], with no printable characters in between).
[See also DelPairs.wcm
included in DelCodes.zip.]
- Convert paired hyphens to a single
printers em dash or en dash, or a hyphen character to a hyphen, or a
"[space] hyphen [space]" to an en dash. The macro inserts an "invisible
soft return" before and after each em dash, and after (not before) each
en dash, so that words divided by dashes can break at the end of a
line. [See also Dashes.zip.]
- Converts double spaces to single
spaces. [See also DeSpacer.wcm
- Delete extra spaces in a document to
at most 2 in sequence. [See also DeSpacer.wcm here.
- Convert spaces to left tabs or left
indents (you can select the minimum number of spaces to search; the
default is 3).
- Convert left tabs to left indents.
- #PAR2TXT.WCM converts WordPerfect's outline paragraph numbers (those
created with Insert, Outline/Bullets & Numbering...) to ordinary
text numbers. NOTE: For WordPerfect 8 and later, download PAR2TXT.ZIP here (7,101 bytes) which contains a
slightly modified version of the macro that has been tweaked to run
under WP8+. But also note that the macro will convert other paragraph
styles (e.g., Heading 2) to ordinary body text. [For a simple manual
alternative see here.]
- #PARCONV.WCM - does the opposite:
- "Searches and replaces text paragraph
numbers (e.g., 1.1, 1.11, 1(c), etc.) and replaces them with automatic
paragraph numbering codes. Useful for converting a document keyed in
with fixed character paragraph numbers. Position dependent and
independent paragraph codes can be selected.
- Note that ANY paragraph beginning
with a 1-6 character "word" AND having a ( or ) or . within the word is
considered to be a paragraph number. Thus, a paragraph BEGINNING with
"U.S.A." WILL have the "U.S.A." converted into a paragraph code.
Accordingly, this macro normally should be used in prompted mode.
- Can also be used to add paragraph
numbers to existing "plain" text that has no text paragraph numbers;
this forces prompted mode."
- IMPORTANT: You probably will want to
edit the macro as follows:
- Change the Application line to
Application (A1; "WordPerfect"; Default!)
- Comment out ("//") all the
Display() commands -- there are eight of them -- except the
Display(On!) command that immediately follows DialogShow
("menu";"WordPerfect"). There should be a Display(On!) command active
at that point (but not a Display(Off!)). Crude editing, but effective.
- The macro defaults to numbering
paragraphs with the standard "Numbers" outline style, but this can be
changed in the vLevel array at the end of the macro code.
- For macro writers: John's _CODES.WCM macro shows codes and numerical character values of the
item to the left and right of the cursor. You can move the cursor and
the display is automatically refreshed, allowing you to see multiple
codes while the macro is running. For WordPerfect 8 and later versions.
- A slightly modified version of
_CODES.WCM, renamed ShowCodes.wcm, can be found in the CODECHAR.ZIP
file by Lindsay Rollo (see below). It now
shows the actual character to the left and right of the cursor.
- NUMCONV.ZIP (8/8/00; 28,551 bytes) - Need to change numbers or dollar
amounts to words? Here are two slightly modified versions of John
Land's ^numcnvt.wcm macro to convert numbers (123, $123.45, 12%) to
words ("One Hundred Twenty-three..." etc.). The "S" (short) version
leaves off the trailing parentheses that enclose the original numerals.
[Back to Top]
[Back to main Library]
Roy ("lemoto") Lewis
- "In a Dialog you select a folder; in a second Dialog you choose a
macro. Then DoFolder runs that macro on each file in the folder."
Many other macros and other items by Roy Lewis are directly downloadable from
his web site at http://www.lemoto.org.uk/corel/mcMenFl.htm and http://www.lemoto.org.uk/corel/mcKyBd.htm.
[Back to Top]
[Back to main Library]
See Gordon's page of free macros here.
COUNTER8.ZIP for WP7, WP8, WP9, and later. (16Kb)
COUNTER6.ZIP for WP61
(Windows 3.1) (16Kb)
[These two files can be found on Gordon
McComb's web site at http://www.gmccomb.com/vault/
under the names "Counter for
WPWin 7/8" and "Counter for WPWin 6.1". They were
renamed here to avoid conflicts with the author's own COUNTER.ZIP and
to allow storing them in the same download folder.]
"Counter is a generic counter system
for WordPerfect for Windows. It keeps track of one or more counters in
documents; the counters are for automatically incrementing numbers,
such as invoice numbers, order numbers, and customer numbers. Can be
used with any document or template. Counters are configured by editing
a simple text file; there is no need to alter the macro engine.
Distributed free, and comes with documentation. For use with WPWin 7
and 8 (Windows 95); not for use with WPWin 6.x or WPWin 7 for Windows
NOTE 1: COUNTER8.ZIP is also bundled inside Barry MacDonnell's
INVOICE.ZIP. Barry's Invoice.wcm macro can (optionally) use Gordon's
Counter.wcm to create an automatically incrementing invloice number at
the time the invoice is generated by the macro. Invoice.wcm with
Counter.wcm work together very well under Windows XP and WP9.
NOTE 2: If you use WP6.1, use COUNTER6.ZIP instead of COUNTER8.ZIP.
Other macros by Gordon McComb, including
some that create calendars and menus, can be downloaded from http://www.gmccomb.com/vault/.
(No support or warranty is offered for
these two macros.)
[Back to Top]
[Back to main Library]
(08/24/08; 296,876 bytes) - Includes three macros and a PDF document
(Indexes and Indexing.pdf) which outlines an approach to creating
indexes; identifies alternative methods of selecting and marking index
entries; demonstrates a technique for creating multiple indexes to any
document; lists macros designed to assist indexing; and provides an
example of a suitable index format.
• Creating Custom
(08/07/08; PDF file, 597,521 bytes) - The document outlines the
advantages of personal or project keyboards, and illustrates how to
assign features, text, programs, and macros to keyboards and templates.
It includes a method of recording the assignments. [See also Assigning a macro, feature, program, or string
of keystrokes to a key or key combination (i.e., a "shortcut" or
• TRANSLATE.ZIP (12/30/05; 35,631 bytes) - This package comprises four
macros and an explanatory document. It was developed to process
translated documents but may also be used with English third party
documents. Co-incidentally the macros can provide items for inclusion
in indexes, and glossaries.
◦ MisSpelt.wcm captures as a list all
text entries identified by the
Spell Checker as 'mis-spelt' or not
already added to a custom
◦ CleanUp.wcm removes punctuation and
other characters and some codes from lists, sorts the list and deletes
duplicate entries. Additional or alternative
characters and codes can be easily added.
◦ ExtractLC.wcm separates into two
documents list entries with an
initial upper case or lower case
◦ Hyphen_Dash.wcm substitutes the WP
CharSet value 4,33 [-] for a hyphen.
• CODECHAR.ZIP (11/23/04;
123,924 bytes) - Finding and Using Codes and Characters in WordPerfect
character or code precedes or follows the cursor may be an important
factor in making a macro work successfully. This included WordPerfect
document assembles information about using the system variables
?Left/?RightCode :: ?Left/?RightChar to find codes and characters in
Some macro tips and code fragments are included, together with guides
to additional resources and other details that affect the use of
variables and commands.
A macro (ShowCodes.wcm)
is also included. The macro displays a small movable dialog on screen
that remains on screen until dismissed; you can then move the cursor in
Reveal Codes and the dialog will show the current code or character's
numerical values to the left and right side of the cursor. You can then
use the value(s) in your own macro when you move to, or around, a
particular area in the document.
• SPACES2TAB.ZIP (8/22/04;
4,702 bytes) - Searches for and deletes all occurrences of multiple
spaces and substitutes a LeftTab code. Particularly useful when tabular
material converted from other programs use multiple spaces to preserve
visual appearance of the original document or table. Can be easily
modified to substitute a single space or other character or code in
(07/18/04; 22,690 bytes) - "Page-Line-Number" - A macro written by New
Zealand author Lindsay Rollo that finds a specified character string in
a document and records in a second document the page number, line
number, and type and location of each string's occurrence. [See also PageLine in the main Library, which
can produce a complete page- and line number Index.]
• SPACES.ZIP (98,375 bytes) -
WordPerfect users who produce self-published documents, prepare them as
camera-ready copy, or who generate PDF files will appreciate this
archive file. It includes a free font, space.ttf,
to produce typographical hard spaces, which improve readability in
headings, measurements, etc.
WPWIN does not
provide for typographic spaces - that is, fixed spaces of various
widths that are proportional of the base font size. At least three
typographic spaces are usually available in dedicated DTP programs.
This archive file includes a TrueType font for creating typographic
spaces [licensed for personal use], and explanatory notes and examples
about the uses for typographic spaces in general documents of all types
and particularly for compliance with ISO standards and academic
publishing standards in scientific, technical and professional
journals, reports and publications. The notes are in PDF format, and
include a macro example for WordPerfect.
Incluided in the above ZIP file is a
separate zrchive file, SPACERS.ZIP,
which contains six macros. These macros can be assigned to keystrokes such as Alt+1,
Alt+2, etc., to automate the insertion of typographical spaces.
[Back to Top]
[Back to main Library]
archive of Charles's macros:
(253,057 bytes; 1 May 08) - Macros by Charles
Rossiter - The archive contains a WPD document and these macros:
- (WP9+) To display messages at the bottom right of the screen:
Page X of Y
• CharCount.wcm (WP9+) - To provide
word, character and white space counts for main text, footnotes,
endnotes, headers/footers, text boxes and comments separately. May be
applied to whole document or to selected text. The results may be
written to the clipboard and so be pasted into the current or a new
For those who need an exact number of characters per line, here
is an easy technique from Charles posted on WordPerfect Universe (and a downloadable style for those who want a
finished product) that can produce (e.g.) 63 characters per line. Note
that this requires a monospace font such as Courier New.
• CleanSave.wcm - To
save a file with a refreshed internal header, with old metadata
Saves the file with
original date and time (optional).
Saves with the original
document summary (optional).
Saves with a backup file
Saves with default font
settings and language settings.
(For WP10 and later versions) - To workaround a bug in WPWin10 [and
later?], which causes the WPWin command Convert Case Initial Capitals to
fail, if the Tools, Settings, Convert option "Do not use printer
metrics" has been selected and written to the default template. The
macro could be attached to the Edit, Convert menu.
This WordPerfect bug seems to have been fixed in a later version of
WordPerfect, since it doesn't now exist in (at least) WPX7. For a more
flexible macro (i.e., more options) that was not designed as a fix for
the problem, see Convert Case.wcm on the Toolbox site here.]
• Delete Current File.wcm
(NOT for WP8 - but see Shredder.wcm in the main Library) -
To delete the file currently on-screen.
• FloatingCellToolbar.wcm - Toggle the
TableFormulaCellBar on/off for Floating Cells.
• Julian.wcm - To
calculate Julian dates, and numbers of days between 2 dates.
• Margins Set.wcm (Not
needed for WPWin8, but functions correctly) - To set margins for pages
and labels. Correction for bug in WPWin9 and later. [See Footnote
• NewSave.wcm - To save
a file with a refreshed internal header. As CleanSave.wcm, but without
• QWManage.wcm - Manage
Create a 2 column table listing all QuickWords Abbreviations and their
Expansions defined in the current, default and supplemental templates.
B. Restore QuickWords
and their expansions from the output of option A created in a table
with 2 columns of Abbreviations and Expansions.
• Reverse Case.wcm - To
reverse the case of selected text.
• SMR.wcm - Macro for
calculating the 95% confidence intervals for a Standardized Mortality
Ratio, given the values of at least 2 of SMR, observed deaths, expected
• SearchCodes.wcm -
Dialog for displaying common codes to be searched for, and for deleting
or replacing these codes from a document.
• Style List.wcm -
Creates a list of all document and outline styles in the default
- Removes Table and Table Cell attributes; leaves table text attributes
(WP9+) - To provide all options available for opening and saving
• WordCount.wcm (WP9+) -
To provide word counts for main text, footnotes, endnotes,
headers/footers, text boxes and comments separately. May be applied to
whole document or to selected text. The results may be written to the
clipboard and so be pasted into the current or a new document.
[Back to Top]
[Back to main Library]
Need to insert identical
text in several locations that you can change easily and quickly?
Here's a macro for WordPerfect 9/10+ to do it (for other WP versions,
or to use a Style as an alternative, see below):
FAUXVAR9.ZIP (16,867 bytes) - A WordPerfect 9/10 macro that mimics
WP10's new document variables feature. As Jim's overview states:
"WordPerfect 10, part of Corel
WordPerfect Office 2002, introduced a new feature – document variables.
Document variables allow a user to create, save, and retrieve variables
which can be placed into a document. This allows the user to simply
change the value of the variable in one place and have those changes
reflected throughout the document." [Ed.-
This includes variables inside headers, footers, notes, etc.]
"FAUXVAR is a WordPerfect
macro system which mimics the behavior of document variables through
the use of character styles. Up to 99 faux variables can be used in a
document. If you wish to create, edit, save or retrieve faux variables,
this macro will simplify the procedure. You may still use WordPerfect’s
built-in styles editor if you desire."
He also states, "You can use
faux variables with WordPerfect 10. You may wish to do this if you
share documents with others with earlier versions of WordPerfect."
NOTE: In addition to the method Jim
describes to edit a faux variable, you can also double-click the
variable's code in the Reveal Codes window.
Copy the macro and its two helper
files to your default or supplemental macros folder. You may want to
play the macro from a toolbar button
or key combination. The macro has a
Help button that explains how to create and edit these variables.
Jim has several free macros for
download at http://ourworld.cs.com/perfectstuff/download_free_wordperfect_macros.htm.
For earlier versions of WordPerfect (i.e., WP9 and earlier)
that do not have the Insert, Variable feature, you can use
a style to duplicate this feature:
You can create a Character style that
contains the text you want to appear in various places in your
document. Then just apply the style in each location (no need to type
the text at those locations since it is already "inside" the style
itself). Here's how.
1. Click on Format, Styles, Create.
This brings up the Styles Editor.
2. Give the new style a name and brief
description. Choose "Character" as the Type. Be sure to check the box,
"Automatically update style when changed in document."
3. In the Contents field of the Styles
Editor, enter (or paste) your text. Format it if desired.
4. Click OK, then Close, to return to
In the document (in an empty area),
click Format, Styles, and choose the new style in the left pane, then
click Insert. (Or, even easier: select the style from the drop list on
your property bar.)
The text should appear in the
document, but if you look in Reveal Codes, all you'll see is a pair of
[Char Style] codes. Click on any one of these codes to bring up the
Styles Editor, make any changes, then close the Styles Editor. The
change should appear wherever the style was applied.
- This use of a style is basically
the same idea behind the new Variable feature of WP10/11.
- There appears to be a limit of
about 4,000 characters that you can use inside a variable or style's
[Back to Top]
[Back to main Library]
Footnote 1 [...continued from above...]
Charles Rossiter's Margins Set macro sets margins
for pages and labels. As Charles said in a post
on WordPerfect Universe: "You should not change label
margins in a document [in WP9 and later]. It should only be done when
you are selecting the label definition; then click Edit. A bug in the
margins dialog (since WPWin9) applies the page margins to the labels." His
macro will do the job, though, including setting label margins to zero.
Footnote 2 [...continued from above...]
You can use Ron Hirsch's Replace Codes - Plus macro to change or augment (add) multiple text attributes or other formatting applied to certain words of phrases with a few separate steps.
While this could be done with other custom macros that simply find and
change (or add additional) format codes, the following tip replaces specific existing formatting with a custom Character style at the various original formatted locations.
(It's also easier to do than to explain.)
This new style acts as a "container" and makes it easier in the future to edit the
new formatting later for those particular items by simply editing any
single instance of the style. It also makes it easier to completely remove the style code -- and thus
either retain the style's new formatting or even remove all the style's
formatting from its text -- as explained on the CustomStyles page.
Suppose you have used italicized redline at
various places in a document that was formatted overall in 12-point
Times New Roman font, and you wish to change these items to bold 10-point Arial font.
Note that the method demonstrated below is
similar for changing other text attributes, fonts, sizes, etc. -- even
solitary text attributes such as bold or underline -- applied to
various body text items.
• Open Reveal Codes (View, Reveal Codes).
• In the document, create a custom Character style that applies an otherwise unused text attribute.
Note: This new
style must be available in the property bar's Styles list (or in
Format, Styles) and it should apply a text attribute or other format
that is not used elsewhere in the document. The purpose is to use the style to temporarily replace
(e.g.) the existing [Italc] and [Redline] format code pairs at locations where
they exist together. [If you are not sure how to create the style, see custom styles for more information.]
For example, create a style so that it applies (e.g.) the Very Large
relative size attribute (or perhaps a distinctive color or font face).
In our example, in the Styles Editor's contents pane you should see
these 3 codes (which may be wrapped inside the pane):
[Very Large][Codes to the Left are ON - Codes to the Right are OFF][Very Large]
Important: The long [Codes to the Left...] code needs to be visible by ticking the box at the bottom of the pane, "Show 'off codes'".
• Name the style (keep the name short and
memorable, such as RepStyle1) and save it. [Optionally, you can copy it
to your default (or other) template for future use in other documents, as explained on the CustomStyles page.]
• Play Replace Codes - Plus in the document -- once for each replacement. See next bullet point.
For the first replacement: Choose the format to replace that typically covers just the word or phrase, or is the least likely of the other format(s) to be used by itself elsewhere in the document. In our example you could choose to replace the redline codes (assuming, for example, that italics might often be used by itself at other locations).
Reason: Since some text formatting can be applied in a "nested" overlapping manner (this is an example of overlapping italic and redline attributes) rather than at the same location (this is an example of non-overlapping italic and redline attributes) you might want to focus first on replacing the least likely attribute (here, the redline attribute).
Recommendation (although not required): Choose (tick) the checkbox option on the macro's menu to Prompt you for confirmation
each item found so that you can see the screen and won't accidentally
change (e.g.) the wrong items. (When prompted, you can exit at any time and
even Undo the last change with Ctrl+Z.) If you know your targeted
multiple text attributes are only used together and are not used alone, you can skip this option.
• Use the radio button on the left side of the macro's pop up menu
to choose the attribute. Tick (enable) the Style checkbox on the right
side of the menu. On the next menu screen, type the custom style's name
at the top of the drop list. Click OK to begin replacing that attribute.
• Repeat this process for the the next format code (here, italics). Repeat again for any other format codes that are part of the multiple attributes to replace. (This repetition does not duplicate the same Style, it just overwrites it.)
When finished replacing the existing format codes, you should now have only very large text items (i.e., created by the custom style) at those locations in your document instead of the original italicized redline text.
This new format created by the applied Style is just a temporary "placeholder" for step #3.
• Edit any instance of the newly applied Style by simply double-clicking on the [Style] code in Reveal Codes to open its Styles Editor.
▸ Place the cursor in the Editor's Contents pane at the top left side of that pane. Delete the [Very Large] code there (unless you really want to use it). Be sure not to delete the long [Codes to the Left...] code, which should remain in place. (Cancel out of the Editor if you make a mistake.)
▸ Then use Shift+Arrow to select all codes in the pane.
(In our example it's probably just the long [Codes to the Left...] code.)
▸ While selected, use the Styles Editor's own menu (or its text property bar) to apply the desired formatting:
Arial, 10-point size, and the bold attribute.
Again, be sure not to delete the long [Codes to the Left ...] code, which should remain in place.
▸ Move the
cursor in the Contents pane back to the top of the pane and you should
now see (in our example) these codes in the Styles Editor:
[Bold][Font Size: 10pt][Font: Arial][Codes to the Left are ON - Codes to the Right are OFF][Bold]
▸ Close the
Styles Editor (click OK) to return to the document. You should now see
that the relevant text items in the document are formatted in Arial 10-point bold.