select a string of word from current cursor position to the string Membership Status:

DSDressler

New member
Joined
Dec 9, 2014
Messages
18
Reaction score
0
Points
0
Location
Bend, OR
I want to select the string of words from the current cursor position to but not including the string "Membership Status:" Thinking easy but mind not working right now... Thanks for any help.
 
Try, for example:
Code:
Sub Demo()
Const StrFnd As String = "Membership Status:"
With ActiveDocument.Range(Selection.Start, ActiveDocument.Range.End)
  With .Find
  .Text = StrFnd
  .Execute
  End With
  If .Find.Found = True Then Selection.End = .Start
  MsgBox Selection.Text
End With
End Sub
 
Back
Top