Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mundelein, Illinois, USA
    Posts
    193
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Locate-Move Insertion Point (Word 2000)

    Is there a way in VBA to read the position of the insertion point relative to the active document window and then to move it to a specified position in that window? I have some simple macro's that allow me to scroll from the keyboard but the insertion point doesn't move with it and the next time I try to do something the doc jumps back to where the insertion point is. If I could move it with the scroll everything would work nice.

    Thanks,
    Thanks,

    C DeWitt

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

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

    Re: Locate-Move Insertion Point (Word 2000)

    I'd move the insertion point instead of scrolling - Word will keep the insertion point in view. For example:
    <code>
    Selection.MoveDown Unit:=wdScreen, Count:=1
    </code>
    to move one screen down (the effect of the Page Down key), or
    <code>
    Selection.MoveDown Unit:=wdScreen, Count:=-1
    </code>
    to move one screen up (the effect of the Page Up key).

  4. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Locate-Move Insertion Point (Word 2000)

    To move the insertion point to the top left of the current window try:
    <code>ActiveWindow.RangeFromPoint(0, 0).Select</code>

    To find where the insertion point is in the current window have a look at the help for <code>GetPoint</code>

    StuartR

Posting Permissions

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