I have the following macro to find any character before minus. Is it possible to use the equivalent of '^?' instead of the long string in .Text? Can someone help? Thanks!
Code:
Sub CharPlusMinus()
'Find ANY character before -
Dim xRng As Range, iType As Integer
For iType = 1 To 2
Set xRng = ActiveDocument.StoryRanges(iType)
With xRng.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = False
'Find any character before -
.Text = "[!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÀÄÇÈÒÖÙÜßçàäèéìòóöùü0123456789]-[!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÀÄÇÈÒÖÙÜßçàäèéìòóöùü0123456789]"
' .Text = "^?-"
.Execute
End With
Next iType
End Sub