I have several instances of the type «Why?« that I want to change to «Why?». My code returns «Why«»
Sub AngleQuotationMarks()
Options.AutoFormatAsYouTypeReplaceQuotes = False
For iType = 1 To 2
Set oRng = ActiveDocument.StoryRanges(iType)
With oRng.Find
.ClearFormatting
.Replacement.ClearFormatting
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Text = "\?" & "(^0171)" '(?«)
.Replacement.Text = "\1" & "^0187"
.Execute Replace:=wdReplaceAll
End With
Next iType
End Sub
|