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®
| Page updated Jan 15, 2021
|TXT2CMT - Text to comment|
Txt2Cmt.wcm is a macro that converts a block of
selected text to a WordPerfect Comment at that location.
Since Comments don't print, this is a great way to "park" draft text out of the way until you want to use it again (see the tip below), or to annotate a document by typing a note, selecting it, and immediately converting it to a Comment.
• Starting with WordPerfect 8 (c. 1997), you don't need a macro to create Comments from selected text: You can select text, right-click on the selection, and choose "Create Comment" from the context menu that appears.
But the Txt2Cmt macro has other advantages:
▸ You can edit the macro and enable a few lines of redlined macro code (that are currently "commented out" or disabled with double slash marks) that will insert the current date and time at the top of the Comment. This "date stamps" the Comment. Other (example) commands can format the Comments' text. (See Footnote 1.)
▸ You can use this macro to format just certain Comments and not others by using it instead of "Create Comment" from the context menu mentioned above. Moreover, copies of the macro could be edited (and renamed) to produce different Comment styles (e.g., different color text) for different purposes. The macros can be assigned to various keystrokes, toolbar buttons, or menu items: see here.
• To see the entire contents of all Comments on screen, click View, Draft. (You must have enabled the Tools, Settings, Display, "Margin icons" option.) To hide them, click View, Page.
Tips and related macros
☼ If you want all Comments in the current document to have a different default format, you can edit the existing Comment style (assuming that at least one Comment exists in the document) to add formatting. Click on Format, Styles, and choose "Comment," then click Edit. Add formatting with the menu or toolbar in the Styles Editor.
☼ If you want all (or some) comments to have a different background color, see Footnote 2.
☼ See also COMMENTR, which converts WordPerfect comments to highlighted (or normal) body text, hidden text, or to footnotes/endnotes. It can also copy all comments to a separate (temporary) document to provide a convenient listing.
☼ There are other ways to "park" draft text. See, for example, BRACKETR.wcm, included with CONVERTR.wcm here.
☼ Some prefer to mark text with highlighting. There's a suite of highlighting tools here.
You can edit the macro and add extra formatting capabilities by adding new macro commands following the "CommentCreate()" command.
For example, you can make the macro create Comments in blue italics, with a font size of 8 points:
CommentCreate // (existing command)
AttributeAppearanceOn(Italics!) // (new command)
TextColor(Red:0; Green:0; Blue:255) // (new command)
FontSize(8p) // (new command)
From a post on WordPerfect Universe:]
Changing the background color that is used for the WP Comment icon is possible at least back to WP8 (possibly earlier). It then becomes your default color for new Comments and is retained for future sessions -- unless you change it back.
A small macro can set the default color value, once you determine the RGB (Red,Green,Blue) values for the icon's background by clicking the User color button in Tools, Settings, Environment, General (tab), User color and passing your mouse (slowly!) over the color palette.
For example, to restore the Comment icon's background color to Light Tan:
// Macro begins
UserName: "Barry MacDonnell";
Messagebox(;;"Finished changing user color!")
// Macro ends
[To copy this macro into your WordPerfect program so that you can play it, see here.]
Obviously, you would insert your own name and initials in the above macro (but retain the double quote marks), as well as your preferred RGB color values.
You can use up to three characters in the User initials field, and up to 79 characters in the Name field. [...]
To assign this macro to a menu, keystroke, or toolbar, see here.
You could also create several saved copies of this macro, each with different settings (one would be to restore your preferred default color), and add them to a toolbar. You could even set up different "initials" for the Comments, such as "#1" or "REM". These will show when (and if) the colored icons are visible (see below).
A separate custom toolbar for the purpose might be appropriate: See here.
[For added convenience, all versions of the macro -- except the one that restores the default color -- could also contain a command to start a new Comment. Just add the command, CommentCreate(), at the end of the macro code above. The macro would then set the preferred color and immediately open a new Comment window so that you can start entering your comments.]
Finally, you won't see these colored icons in Page View unless the icons are on separate lines (otherwise you will see stacked "balloon" icons). Switch to Draft View to see the colors and the Comment's text, even if several are on the same document line. (In WP8/WP9, the colors will not show in Draft View, but they show in Page View and Two Page View.) Note that you won't see them if the User initials field is empty.