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

Page updated Dec 17, 2007
CODE2TXT - Change attribute codes to text markers

Download CODE2TXT.ZIP (versions 2.12 and /2.0; 11/19/07; 60,297 bytes)

Contains two macros and a README file:
Version 2.0 for WP8
Version 2.12 for WP9 and later versions

Version 2.12 (included in the ZIP file above) adds the ability to change Superscript, Subscript, Fine, Small, Large, Very Large, Extra Large, and Highlight codes to text markers, and vice versa.

Compatible with WordPerfect versions 8,9,10,11,12,X3

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

[The download file contains two macros. See column at left.]

"Change attribute codes to text markers.wcm" is a macro that can

  • change text surrounded by WordPerfect attribute codes (e.g., [Bold On]...[Bold Off]) to text surrounded by user-defined plain-text markers (e.g., <B>...</B>), or do the opposite:
  • change text bracketed by user-defined text markers to WordPerfect attribute codes.

The first function (codes to text markers) is useful when converting (saving) a document to ASCII or ANSI text but you want to identify the old attributes with unique text markers, such as HTML tags or to replace WordPerfect format codes with Folio, Ventura Publisher, InDesign, or QuarkXpress markup codes, etc.

The second function (text markers to codes) can be useful to restore a document saved after converting from codes to text markers with the first function, or whenever you want to convert identical, marked strings of text to formatted text (e.g., bold, redline, etc.). Note that you can also use it to convert text marked with ordinary words (up to 20 characters) and/or symbols (inserted with <Ctrl+W>).

The codes that can be converted (in v2.12) are:

  • Italics
  • Bold
  • Underline
  • Double Underline
  • Small caps
  • Redline
  • Strikeout
  • Shadow
  • Outline
  • Superscript
  • Subscript
  • Fine
  • Small
  • Large
  • Very Large
  • Extra Large
  • Highlight

Please be aware that changing highlighting to text markers such as <H> and </H> changes all instances of highlighting regardless of the highlight color, and changing text markers back to highlighting uses the current highlight color -- i.e., the one chosen on the main toolbar (or with Tools, Highlight, Color).

You can select any -- or all -- of these codes from a menu. You can also choose to retain the original attributes after converting the codes/markers, and/or delete all 'empty' code pairs.

Modifications:
Various choices (checkboxes, text markers) that are displayed on menus when the macro plays can be set in the redlined
User Modification Area at the top of the macro code.

Known Limitations:
1. Please be aware that the macro will not process the "redline" and "strikeout" codes produced by File, Document, Review. Those codes are very different from the normal attribute codes for redline and strikeout (i.e., [Redline] and [StkOut]) accessible from the property bar (toolbar) or from Format, Font.

2. At this time, the macro does not process format codes that are inside a style (including standard paragraph Headings and Outlines). Because such formatting is designed to be relatively "hidden" from view, the macro does not "see" the codes that cause the formatting.

3. Note that the second choice on the initial menu ("Convert text markers to WordPerfect format codes") does not process items inside headers, footers, footnotes, endnotes, or text boxes. There are limitations in the macro language that make the process unreliable with the way the macro is coded. If you use the second choice, you should examine the document and make any required changes in these areas by directly editing them.

Page Top