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® |
||
Download ALPHADIV.ZIP (version 1.01.02; 10/23/07; 12,048 bytes) Compatible with versions WP8-WPX3 |
A macro that divides any alphabetized list such as an index or directory with the appropriate capital letter between each section. ("A," "B," "C," etc.). All lines from the cursor position to the end of the document will be processed. Several options are available from a menu, including a choice of letter color. Be sure to place cursor on the first line of the alphabetical list before playing the macro. The alphabetical list must not be inside a table, header, or other substructure. The macro will work only inside normal body text (including columns). TIP: If you want to create alphabetical headings for paragraphs of text (not just single lines of text, which is what ALPHADIV was designed for), you can manually add letter headings to specific paragraphs with a simple macro, such as the following, which is based on code posted by Charles Rossiter, Corel C_Tech, on the WordPerfect 10 newsgroup. It uses the first letter of the paragraph as a heading (divider), so be sure to sort the paragraphs first. (Also see "Copying Code from a Web Page" below if you want to copy the macro into WordPerfect). // Beginning of macro Instructions: Put your cursor on the start of the appropriate paragraph entry (i.e., before all text on the line) and play the macro. It should insert a large, bold letter, one line above the paragraph. You can assign this macro to a toolbar button or keystroke. Optional code
for the above macro: An alternative
to using the two Attribute... commands to create the large, bold
divider letter is to use a style with the StyleOn command (see
below). Be aware, however, that using a system Heading style
means the letters will be marked for inclusion in any Table of
Contents. To insert a space between the
letter and the paragraph, add these two commands just after the
letter is formatted: COPYING CODE FROM A WEB PAGE OR NEWSGROUP: To copy a macro from a newsgroup message or web page, select all text from beginning to end, and copy it to the Windows clipboard with Ctrl+C or Edit, Copy. Next, open a blank document in WordPerfect and click on Tools, Macro, Macro Toolbar to display the Macro Toolbar. Position your cursor after any codes in Reveal Codes, and click on Edit, Paste Special, Unformatted Text to paste the macro code into the WP document without any extraneous formatting or other unwanted codes. [You generally want to copy the original as plain text. Later, you can highlight it or use redline or color, etc.] Check the pasted text for long lines that may have wrapped into two or more lines with a hard return [HRt] or line break [Ln Brk] between them; remove the hard return(s) or line break(s) to "glue" the lines back together. Save the pasted material with the Save & Compile button on the Macro Toolbar. This will save the macro to your default macros folder as shown in Tools, Settings, Files, Merge/Macro. |