Consulting

Results 1 to 3 of 3

Thread: Select words macro

  1. #1
    VBAX Regular
    Joined
    Dec 2021
    Posts
    40
    Location

    Select words macro

    Hello,
    can you help me to write simple macro to select text starting from current position of keyboard cursor to position of round bracket "(". The bracket should not be in the selection. Information for backward compatibility: I need this for Word XP.

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,398
    Location
    That's as simple as:
    Sub Demo()
    Selection.MoveEndUntil "(", wdForward
    End Sub
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    VBAX Regular
    Joined
    Dec 2021
    Posts
    40
    Location
    Thank you.

Posting Permissions

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