Search Button
I want to create a Text box and Search button in ms word. When I enter text in the search box and click the search button the code should find the text searched for. I tried the following code but it is not working.
Public Sub FindWord(sWord As String)
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = sWord
.Execute
End With
End Sub
Any help would be greatly appreciated. Thank you.
|