Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trapping double-click in built-in Dialogs(wdDialog ((Word))

    Is there a way to detect that the user has double-clicked on one of the
    bookmark names using Dialogs(wdDialogInsertBookmark)?
    If the user uses the Add button, I can test the value of .Display = -1.

    However, if the user double-clicks and then uses Close button, .Display
    = -2. So I don't know whether the user "moved" a bookmark by
    double-clicking. User might have "moved" more than one bookmark.

    I could keep track of the positions of all the bookmarks in the document,
    but there should be an easier way.

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Trapping double-click in built-in Dialogs(wdDialog ((Word))

    By using

    Selection.BookmarkID

    you might be able to establish the "current" bookmark before opening the dialog and test again after the user closes the dialog. A change to the bookmark id indicates a "goto".
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Trapping double-click in built-in Dialogs(wdDialog ((Word))

    I need to trap the Dialog.

    I am trying to warn the user that s/he is trying to Add a bookmark that already exists.

    I can trap the Add button, but if the user double-clicks on a bookmark name, Word "moves" the bookmark from its prior location and I have no way of knowing where the bookmark lived unless I do tumblesaults to keep track, so I cannot easily undo the deed.

  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: Trapping double-click in built-in Dialogs(wdDialog ((Word))

    In Word2000, if I double-click a bookmark name, it seems to activate the GoTo button and move the insertion point. As far as I can tell, double-clicking alone doesn't change the bookmark definition. Are you testing in XP?

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Trapping double-click in built-in Dialogs(wdDialog ((Word))

    Yes, Word 2002 does the same thing.

    If that results in t he selection being moved, I can detect that. But if there are multiple bookmarks at the destination, I do not know which was used.

    It is possible that the selection would not be moved, then I'd not know what to do.

    Seems only workaround is to copy the list of bookmarks and make my own Bookmarks dialog.

Posting Permissions

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