Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Browse target (W97, WinNT4)

    This is driving me mad. I want to set the 'browse by' button (at the bottom of the vertical scrollbar on any open Word document) so that it browses by page by default, and in the object browser I've found the terminology used - Word.wdBrowseTarget.wdBrowsePage - but I cannot work out how to use it!

    I've named a variable to carry it, putting '=true' on the end, putting it up at the 'option explicit' in 'this document' and half a dozen other ways but nothing will make it work! I've looked on the MSKB, searched the VBA board here, tried the help in VBA itself - all to no avail!

    Can anyone put me out of my misery?! <img src=/S/sad.gif border=0 alt=sad width=15 height=15>
    Beryl M


  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Browse target (W97, WinNT4)

    Beryl,

    Try this syntax:

    Application.Browser.Target = wdBrowsePage

    For more info, see the "Browser Object" VBA help topic.

    You might want to put this into an AutoExec procedure if you want it to be global to the Word session.

    - although I get 'browse by page' by default (Word 2000) - are you getting a different default?

    Gary

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Browse target (W97, WinNT4)

    Great, Gary, that did it - and yes, I did have a different default; I don't know what it was but if you clicked on the 'next' button without changing it, it just brought up a dialog box saying it had searched to the end of the document and hadn't found any! Presumably if my document had some of whatever it was looking for it would have found them, but apparently I didn't (and never have!).

    I'm using W97, not W2k, (here, anyway) so they may have changed the default for W2k. They must also have added the 'Browser Object' for W2k, because it isn't available in W97!

    Many thanks!
    Beryl M


  4. #4
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browse target (W97, WinNT4)

    For me the default is to browse by page UNTIL I do a find. Then the default is to always try to find the last thing I tried to find using the Find dialog box. I don't know if that was the cause, but I doubt the change suggested by Gary (as great as it was for the initial start of a Word session) would affect that. Handling that would be a little more tricky and would require help from someone who knows more than I.

    Troy

  5. #5
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Browse target (W97, WinNT4)

    Again, are you sure you're not talking about W2k, not W97? Because that has never happened in W97 that I know of.
    Beryl M


  6. #6
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browse target (W97, WinNT4)

    Yes. At work we are still on 97. It starts off with the default to browse by page. However, if during the Word session, I do a find through the Find dialog box, the browse buttons change to do find. It resets again to default to browse by page when close and reopen Word.

    If that's not how it works for you, great!! But that's how my machines work.

    Troy

  7. #7
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Browse target (W97, WinNT4)

    Hmmm ... I just did some experiments, and it seems to do it sometimes and not others! It doesn't have to be a find that will change it ... 'go to' can do it, and some other bits.

    How piggy-hoo-lear ...
    Beryl M


Posting Permissions

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