Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate |
![]() Toolbox for WordPerfect |
||
Macros, tips, and
templates for Corel® WordPerfect® for Windows® |
Page updated Apr 3, 2019 |
|
LineWrap - Converts single
hard returns ([HRt]) at the end of selected
lines or paragraphs to soft returns ([SRt]). This allows automatic
wrapping of the selected lines at the right margin (a.k.a. "word wrap"). Double hard returns between the paragraphs (which must exist for the macro to work) are not converted so that individual paragraph structures are retained. See sample screen shots below. |
|||
Related pages - DelExtraHR - Deletes all multiple adjacent hard return codes and replaces them with a single hard return. [You could play it after using LineWrap.] DeSpacer - Reduces multiple adjacent spaces to single spaces. |
Purpose LineWrap.wcm very quickly removes single hard returns ([HRt]) at the end of
lines in
plain-text (ASCII-type) files that have been pasted or otherwise
imported into WordPerfect
-- or any document containing adjacent lines where each line ends in a
single hard return -- and replaces them with soft returns ([SRt]). (See screen shots below.) Important note Double hard rerturns are retained since presumably they are used as paragraph separators -- and in fact they must exist between paragraphs for the macro to work properly. If they don't exist before playing the macro, the selected text will become a single, run together paragraph. Screen shots • sample text BEFORE playing LineWrap • sample text AFTER selecting that text and then playing LineWrap Tip To later remove multiple adjacent hard returns separating paragraphs so that only single hard returns remain see the DelExtraHR.wcm macro here. You should play it after using LineWrap -- but this works best for paragraphs that already have first line indentation (i.e., using tabs, indents, etc., or by using Format, Paragraph, Format, "First line indent"). Instructions (1) Just select the sentences or paragraphs (or the entire file, with Edit, Select, All) that you want to strip of intra-paragraph hard returns, and then - (2) play the macro to "fix up" the file and allow the lines to wrap at the margin. Operation (for the curious) LineWrap does its work by opening a new document window and pasting your selection into it. Then it temporarily converts each paragraph (i.e., text ending with 2 hard returns) in the selection into a new page (which is just a format code, not a real page), strips out all hard returns on all pages, then converts the new document back into continuous paragraphs -- but without all those pesky single hard returns embedded in them. Finally, it pastes the newly stripped text back into your original document and closes the temporary window. A cautionary note (for everyone) As noted above, converting multiple adjacent paragraphs
requires that all the paragraphs be separated by two or more
hard returns. You may have to edit the document to
ensure this is true before using LineWrap. If the paragraphs are separated by a single hard return, you could use Find and Replace, and try searching for periods followed by hard return codes (.[HRt]), then replace them with a period plus two hard return codes (.[HRt][HRt]). Then select the paragraphs and play LineWrap. Related macro See FIXMSGS. |
||