Results 1 to 5 of 5
  1. #1
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Position on page (97/2000/2002/XP)

    Experiment with these various properties and see how they work for you:

    Dim sng As Single
    sng = PointsToInches(Selection.Information(wdHorizontalP ositionRelativeToPage))
    sng = PointsToInches(Selection.Information(wdHorizontalP ositionRelativeToTextBoundary))
    sng = PointsToInches(Selection.Information(wdVerticalPos itionRelativeToPage))
    sng = PointsToInches(Selection.Information(wdVerticalPos itionRelativeToTextBoundary))

    I believe they measure from the beginning of the selection only, but I have barely played with them at all.

  2. #2
    New Lounger
    Join Date
    Nov 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Position on page (97/2000/2002/XP)

    Thanks.

    I saw a reference to these and they seemed to be close to what I needed.

    I was hoping someone had extensive experience in this area and had some
    useful algorithms already worked out. Yah right! (I

  3. #3
    New Lounger
    Join Date
    Nov 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Position on page (97/2000/2002/XP)

    Hello all! Great Lounge! New Member. Dumb Question :-(

    How do I tell; in VBA; approximately where on the page the insertion
    point, range start or end, etc. is positioned. That is - in inches, points,
    centimeters, whatever...

    I'm automating letters and want to insure the closing section is
    correct for our standards.

    Thanks in advance.

    P.S. I'm pretty impressed with Word's (Office's) object model.
    Been programming a long time and although Word is pretty dense,
    I'm thoroughly enjoying it.

    I figured out an algorithm that iterates across the character space,
    but since I know VBA is interpreted the processing time will be
    prohibitive for anything but the most trivial of documents.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Position on page (97/2000/2002/XP)

    Although Word 2000 plays them down in favor of text boxes, frames are the traditional method for precise positioning. However, I much prefer formatting that doesn't require visiting a dialog to understand.

  5. #5
    New Lounger
    Join Date
    Nov 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Position on page (97/2000/2002/XP)

    Thanks jscher2000:

    You just allowed me to sleep for a change.

    My task is immensely easier...

    Thanks again.

Posting Permissions

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