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 BPSTYLES.ZIP (v1.09.01; 10/22/07; 28,673 bytes. Includes a WPD document demonstrating and explaining the macro's operation.) Compatible with WordPerfect 8,9,10,11,12,X3 |
BlockProtectParaStyles.wcm - A macro that adds block protection (same as Format, Keep Text Together, Block Protect) to all user-specified or default paragraph styles (e.g., Headings) in a document, to keep the style and the next two lines of body text together on the same page. The resulting Block Protect codes will be placed like this in Reveal Codes:
Naturally, as in the example above, you must have some paragraph styles in the current document for the macro to block-protect. Normally, to apply these paragraph styles you simply place your cursor anywhere on a heading, section, or title line and choose a paragraph style from the Style List on the Text Property Bar (or click Format, Styles, choose a style, then click Insert). Most users probably will use the default Heading 1 through Heading 5 styles, but you can use any available paragraph style. The macro can be played anytime and multiple times in any document. If you insert new section labels, heading lines, etc., just play the macro again. Do the same if you delete blocks of text to ensure that all styles are properly processed. Thanks to Graham Ginsberg for the original idea and suggestions during development. Notes and comments:
What about using Conditional End of Page (CEOP) -- accessed via Format, Keep text Together? CEOP has been reported to work inconsistently, especially with counting blank lines following a paragraph heading style, since the number of such "textless" lines could vary in a document. What if you put the CEOP inside the paragraph style? As Noal Mellot, a WP Universe guru, stated: "CEOP will, in a paragraph style, keep together any text encapsulated in the style itself ... ; but it will not keep this text together in any consistent way with text outside the style." Also, setting the CEOP's value properly (to keep headings and following text together) requires you to take into account not only the expected number of blank lines following the heading, but also any double-spacing or other-size-spacing (if used), sub-heading lines (and any hard returns that separate them), etc. For example, if you select "CEOP: 2", this will "keep together" two lines of single-spaced text, but only one line of double-spaced text. Moreover, if you have multi-line paragraph-style headings followed by one or more blank lines, the heading and following body text might not be "kept together" by the current CEOP setting, since the CEOP will count the number of lines in the larger heading and fall short of the needed value at that location. It seems to this author that BPStyles is a better solution when paragraph styles are used as headings. |