Hi All,
I am tried invoke code and getting these error,can anyone help to resolve this.
Sub SelectARangeOfTexts()
Dim ObjSelectText As Range
Dim strText As String
strText = InputBox(“Enter Marking word(s) here:”, “Select a range of texts”)
Set ObjSelectText = Selection.Range
With Selection
.HomeKey Unit:=wdStory
With Selection.Find
.ClearFormatting
.Text = strText
.MatchCase = True
.MatchWildcards = False
.Execute
End With
ObjSelectText.End = Selection.Range.End - Len(strText)
ObjSelectText.Select
End With
End Sub