Results 1 to 3 of 3

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

  1. #1
    Seeker DSDressler's Avatar
    Join Date
    Dec 2014
    Location
    Bend, OR
    Posts
    18
    Articles
    0

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



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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.

  2. #2
    Acolyte macropod's Avatar
    Join Date
    Mar 2017
    Posts
    39
    Articles
    0
    Excel Version
    2010
    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
    Cheers,
    Paul Edstein
    [MS MVP - Word]

  3. #3
    Seeker DSDressler's Avatar
    Join Date
    Dec 2014
    Location
    Bend, OR
    Posts
    18
    Articles
    0

    Works Great! Thanks for your help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •