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®
© Copyright 1996-2018 by Barry MacDonnell. All Rights Reserved.

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.)

Download LINEWRAP.ZIP (01/05/13; 4,457 bytes)

Compatible with WordPerfect 6 and later versions

WordPerfect 11 users:
See important information about using macros in the first release of WP11 ( at the top of this page.

Downloading, Documentation, Modifications, and Support

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.

Note: This page and the download macro was previously named FixASCII. It was renamed on Jan 5 2013 to make it more descriptive of its purpose.


This macro 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.)

This allows "word wrapping" of the selected words, sentences, or paragraphs and makes reformatting such items or other copied material (such as e-mail messages, selected material from PDF files, copied material from Internet sites, etc.) much easier.

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.]

Screen shot of some text BEFORE playing LineWrap

Screen shot AFTER selecting that text and then playing 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.]

Related macro