View Single Post
 
Old 03-15-2014, 05:15 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,343
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
  .InsertBefore vbCr
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "^13[A-Za-z0-9~]"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
    .Text = "^13[!A-Za-z0-9~] "
    .Replacement.Text = "^p"
    .Execute Replace:=wdReplaceAll
  End With
  .Characters.First = vbNullString
End With
Application.ScreenUpdating = True
End Sub
If the above doesn't do what you want, please attach a document to a post with some representative before and after data (delete anything sensitive). You do this via the paperclip symbol on the 'Go Advanced' tab - don't simply post more code that doesn't work.

PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote