View Single Post
 
Old 05-08-2013, 03:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,471
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:
Dim RngStory As Range
For Each RngStory In ActiveDocument.StoryRanges
  With RngStory.Find
    .ClearFormatting
    .Text = "[!\!-\" & ChrW(8195) & ChrW(8194) & "],_,a-z,§,¶,\, ,^13,^m,^l,^s,^=,^+,^t,^-,“,”,‘,’,^2]"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchWildcards = True
    .Execute
  End With
Next RngStory
PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.

Note: If the intention is to have the macro stop at ChrW(8195) & ChrW(8194), change:
.Text = "[!\!-\" & ChrW(8195) & ChrW(8194) & "],_,a-z,§,¶,\, ,^13,^m,^l,^s,^=,^+,^t,^-,“,”,‘,’,^2]"
to:
.Text = "[!\!-\],_,a-z,§,¶,\, ,^13,^m,^l,^s,^=,^+,^t,^-,“,”,‘,’,^2" & ChrW(8195) & ChrW(8194) & "]"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote