Microsoft KB Archive/59998

Replacing Hard Carriage Returns with Soft Returns

PSS ID Number: Q59998 Article last modified on 05-14-1991

1.00 MS-DOS

Summary: The following macro replaces all hard carriage returns in a Microsoft Word for Windows document with soft carriage returns (except for the last hard carriage return, which cannot be replaced because Word for Windows documents must contain at least one paragraph marker): SUB Main a$ = CHR$(13) b$  = CHR$(11)  StartOfDocument  EditSearch a$  While EditSearchFound if Not WordRight(,1) Then Goto fin WordLeft(1,1) EditClear Insert b$ EditSearch a$ WEND fin: END SUB

Reference(s):

Additional Keywords: w4wmacro