b_bookg.gif (182 bytes)Guides (MS-Word97)

Macro - Reformatting ASCII text/email

M-1

Demonstrates: Macros
l_stone.gif (2795 bytes)

wrdma01.gif (10494 bytes)

Email messages and other text files imported into word often contain hard returns at the end of each line. The following macro will rebuild most of the document to get rid of the hard returns and fixes the paragraph formatting.

  1. Open the document you want to reformat
  2. Select Tools | Macro | Record New macro.., give the macro a name eg. ReturnFixup, click  [Ok],
    the macro recorder will start
  3. Choose Edit | Replace. In Find what box type ^p, in Replace with type ~. Click [Replace All]
  4. Click [Ok] at the prompt
  5. While the replace box is on the screen. In Find what box type ~~, in Replace with type ^p. Click [Replace All]
  6. Click [Ok] at the prompt
  7. Click [Close] to shut the Replace dialog box
  8. Click the Macro Stop button to stop the recorder.

The next time you want to Fix the returns just run the ReturnFix macro.

b_ref.gif (1385 bytes)Ref: Campbell, G. (1997, Nov)

[Rev 6/10/98] 6/10/98 © 1998 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.