Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    set mouse pointer to selection.range (Word97/SR2)

    I've searched as high as Woody's Lounge and as far as the API-Guide, but can't get a clue as to how to do what-I-want.

    I want to make the mouse-pointer move to a known range in my active document.

    Here's a typical situation: I have built a trail of hyperlinks through my document. Each occurrence of the word "test" is hyperlinked to the next occurence further down the document; the last occurrence, near the foot of the document, is hyperlinked to the first. Hence a circle of hyperlinks.

    User clicks on any one of these hyperlinks, and Word magically jumps the screen to show the next hyperlink. The text cursor (blinking vertical bar) is correctly positioned at the left-hand end of the new hyperlink. My poor user (me!) has to slide the mouse to that hyperlink before clicking. This is a boring and repetitive task, and the computer should do it for me.

    The API guide and my VBA help seems to tell me that I can position the mouse within a GUI form, but I want the equivalent of:

    <pre> Dim rng As Range
    Set rng = Selection.Range
    Application.Mouse.Position = rng.Start
    </pre>


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: set mouse pointer to selection.range (Word97/SR2)

    This may lead people to complain to Microsoft about their mouse racing and jumping across the screen. See MSKB 103332 - Mouse Races and Jumps Across Screen.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: set mouse pointer to selection.range (Word97/S

    >You have a serial mouse connected to a port based on the 16550 UART chip.

    Hang about while I go re-check the API-Guide for serial port work; If I were TRULY very clever, I could write a function that tied the tail, so to speak, of the mouse while the front end was chewing away on some cereal.

Posting Permissions

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