| Barry MacDonnell's
Toolbox for WordPerfect
Macros, tips, and
templates for Corel® WordPerfect® for Windows®
| Page updated Jul 22, 2014
| LineWrap - Converts single
hard returns ([HRt]) at the end of selected
lines or paragraphs to soft returns ([SRt]). This allows
automatic "word wrapping" of the lines at the margin.
Double hard returns between the paragraphs are not coverted so that individual paragraphs 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.
macro very quickly removes single hard returns ([HRt]) at the end of
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.)
Double hard rerturns are retained
since presumably they are used as paragraph separators. [Tip: To remove multiple adjacent hard returns so that only single hard returns remain, see the DelExtraHR.wcm macro here. You could play it after using LineWrap.]
(1) Just select the sentences or paragraphs (or the entire file, with Edit, Select, All) that you want to strip of single 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)
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.]