View Single Post
 
Old 05-26-2018, 06:15 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

It don't know why you'd have an opening parenthesis within a field code but the closing one outside it. That said, you might try:
Code:
Sub MarkParenthesizedItalicsNoProofing()
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Text = "\([A-Z][a-z.][!\(]@\)"
    .Replacement.Text = ""
    .Forward = True
    .Format = False
    .MatchWildcards = True
    .Wrap = wdFindStop
    .Execute
  End With
  Do While .Find.Found
    .Start = .Start + 1
    .End = .End - 1
    If Len(.Text) = 0 Then
      .End = .End + 1
    Else
      If .Font.Italic = True Then .NoProofing = True
    End If
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote