Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Thanked 0 Times in 0 Posts

    Replacing more than one paragraph (Word 2003 sp3)

    I have saved a mile of emails from outlook as a text file. I then saved the text file as a word file. My problem is what should then be a 100 plus page doc is coming out as 3000 plus pages because the doc includes multiple version of emails from when the reply contained the original text and the ads and assorted garbage that can get tagged onto the end of emails.
    when i go to do a replace to replace multiple paras with nothing, the Find What window will not accept the insertion (Copy and paste). does anyone have any idea on how i might short circuit the task of removing each multiple entry piece by piece?

  2. #2
    Super Moderator
    Join Date
    May 2002
    Canberra, Australian Capital Territory, Australia
    Thanked 405 Times in 334 Posts

    Re: Replacing more than one paragraph (Word 2003 sp3)

    Hi cpquigley,

    Do the duplicate messages have the usual pair of '>>' characters at the start of each line? If so, it should be a fairly simple matter to use a macro to delete all such lines - especially if they're delimited by paragraph marks at the end of each line.

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Ottawa, Ontario, Canada
    Thanked 1 Time in 1 Post

    Re: Replacing more than one paragraph (Word 2003 sp3)

    <P ID="edit" class=small>(Edited by wdwells on 06-May-08 21:43. Revisited the approach on realizing that there may be only one file containing all messages.)</P>I would be inclined to save those emails as individual files and then develop a macro which will:

    <UL><LI>Open each file and append to an array, the: Filename; Sender; and Sent-Time before closing the file
    <LI>Open each file, and determine the Sender and Sent-Time of the message that is being replied to.
    <LI>Search through the array for that combination of sender and time.
    If found: you can replace all below the Sender/Sent-Time with a note identifying the filename of the reference..
    If not found; proceed down to the next Sender/Sent-Time and search the array again
    Repeat until a match is made (replace from that point on); or
    the end of file is reached.
    <LI>Save and close the file
    <LI>Get the next file and repeat the process[/list]Now you can develop a second macro to merge all files into a single word file if you want; but this will defeat the benefit of the notes you inserted unless you also insert cross references.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts