Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    N.W. Indiana, Indiana, USA
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting Pasted Text

    Looking for an easy way to format text in Word that has been copy/pasted from email (outlook express)

    Line length is always short with the pasted text and having to correct it line by line to fill the line length is a pain.

    If anyone has a solution to this....I will be forever in your debt (for whatever thats worth)

    Thanks...

    Jack D. Rees
    jrees@netnitco.net

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Pasted Text

    Jack,

    This is what I do; I remember Woody does this as well, just better.

    Manually:

    .Search for ^p^p and replace by @@ (that gives 2 successive paragraphs in a row and replaces them with something temporarily)
    .Search for ^p and replace by a space (Getting rid of any remaining end of para markers)
    .Search for @@ and replace by ^p^p (restoring any paras removed in the first step).

    Automatically: record this and adjust to suit the emails you get.

    You can start to get fancy from there- but that's a starting point.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Pasted Text

    Hi Jack:
    2 other things you can try:
    1) select the text & press Alt+Ctrl+K (reformats the text & takes out extra lines).
    2) Try this macro which operates on selected text:

    Sub EmailClean()
    '
    ' EmailClean Macro
    ' Macro recorded 10/8/99 by Phil Rabichow
    '
    Application.ScreenUpdating = False
    Selection.Range.Style = ActiveDocument.Styles(wdStyleNormal)
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = "^p^w"
    .Replacement.Text = "^p"
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
    .Text = " {1,}^013"
    .Replacement.Text = "^p"
    .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    With Selection.Find
    .Text = " {3,}"
    .Replacement.Text = ""
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = "^w^p"
    .Replacement.Text = "^p"
    .MatchWildcards = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
    .Text = "^p^p"
    .Replacement.Text = "%$%"
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
    .Text = "^p"
    .Replacement.Text = " "
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
    .Text = "%$%"
    .Replacement.Text = "^p"
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = ". {1,}"
    .Replacement.Text = ". "
    .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = "? {1,}"
    .Replacement.Text = "? "
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
    .Text = "! {1,}"
    .Replacement.Text = "! "
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = "^w^p"
    .Replacement.Text = "^p"
    .MatchWildcards = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
    .Text = "^p"
    .Replacement.Text = "^p^p"
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
    .Text = " {1,}^013"
    .Replacement.Text = "^p"
    .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdMove
    Application.ScreenUpdating = True
    End Sub

    Hope this helps.

  4. #4
    Lounger
    Join Date
    Jan 2001
    Location
    Phoenix, Arizona, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Pasted Text

    I have to do this literally all the time. I just use paste special which takes no formatting with it. I then just have clean text and I can apply whatever formatting is appropriate. If my end document is a letter, I just end up with my text in normal for our letter template. I use it so much I created a keyboard shortcut for myself, so it's a simple, fast operation.

Posting Permissions

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