Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2010
    Location
    Denver, CO
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page Position (Word 2002)

    Is there a way to retrieve the position of the insertion point on the page--in inches, points or twips from the top of the page? I am automating Word from another program and will be inserting an Excel Spreadsheet range to a bookmark. I have this accomplished, except that if the range is too long to fit on what left of the page, I need to split the range. Therefore, I am looking for a way to determine the vertical location (relative or exact) of the insertion point (or of a bookmark, for that matter). I would be grateful for any comments.

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

    Re: Page Position (Word 2002)

    The Range and Selection objects have a property Information that can be used to retrieve all kinds of information about the range/selection. In particular, you can get the vertical position relative to the page:

    Selection.Information(wdVerticalPositionRelativeTo Page)

    and to the text boundary:

    Selection.Information(wdVerticalPositionRelativeTo TextBoundary)

    Both return a result in points.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2010
    Location
    Denver, CO
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page Position (Word 2002)

    Hans, you usually have the information I need. Thanks again. <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

Posting Permissions

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