Unable To Select (Highlight) Selection In Word
I have a few procedures where I am trying to select a range. For some reason i get a valid selection object, but the selection does not "select". I get no highlighting of the selection.
Example
The debug.print provides the expected results for the selection object, and the correct range turns bold. So somehow I am getting the correct selection object but it is not showing the "selection.
I have a few procedures where I am trying to select a range. For some reason i get a valid selection object, but the selection does not "select". I get no highlighting of the selection.
Example
Code:
Private foundRange
Public Sub ReplaceTextOnly(strReplace As String)
If Not foundRange Is Nothing Then foundRange.Text = strReplace
foundRange.Select
'For Test purposes
Debug.Print Selection.Text
Debug.Print Selection.Start & " " & Selection.End
Selection.Font.Bold = True
End Sub
The debug.print provides the expected results for the selection object, and the correct range turns bold. So somehow I am getting the correct selection object but it is not showing the "selection.