Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Dec 2002
    Location
    San Francisco, California, USA
    Posts
    54
    Thanks
    6
    Thanked 1 Time in 1 Post

    Page Number of Search Result (Word 97)

    I would like to know the page location of a search result. That is, I search for "Term" in my document that contains multiple section breaks (next page and continuous) and when "Term" is found, I extract the page number that "Term" is located at. Any suggestions?

  2. #2
    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: Page Number of Search Result (Word 97)

    Take a look at the .Information collection of the Selection and Range objects. In <!post=Post #204230,204230>Post #204230<!/post> I provided the code of a macro that would read the p1s2-format page number(s) of the beginning and end of a selection. Can you adapt that to your needs? In the case of a single found word, you won't need to query both the beginning and end of the word, but if you find a phrase that could break over two pages, you might need the more complicated approach laid out in that post.

  3. #3
    Star Lounger
    Join Date
    Dec 2002
    Location
    San Francisco, California, USA
    Posts
    54
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Page Number of Search Result (Word 97)

    It appears to, thank you very much

Posting Permissions

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