Replacing question mark plus wrong angle quotation mark
Hi! I need help to replace wrong "?«" with "?»", for the result is "«»". Here is the code:
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)" 'to find ?«
.Replacement.Text = "\1" & "^0187" 'to replace with ?»
.Execute Replace:=wdReplaceAll
End With
Next iType
End Sub
|