Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2001
    Location
    Columbia, South Carolina, USA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    end of doc check? (MS Word 2k/xp)

    newbie question: How do I test to see if the current selection is at the end of a document? I tried "If (Selection.End = ActiveDocument.Contents.End)" but never equated to true (endless loop).

    TIA,
    Chip

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

    Re: end of doc check? (MS Word 2k/xp)

    Two small changes will fix your code. Use Content, not Contents, and subtract 1 before the comparison.

    If If Selection.End = ActiveDocument.Content.End -1

    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
  •