Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ToolsCustomize (Word 2000)

    Can anyone explain to me why the ToolsCustomize command from the Tools menu is NOT the same as the one that is fired when you right click on a toolbar and select Customize?

    I've written a replacement for ToolsCustomize and it fires fine if I select Customze from the Tools menu. But doesn't fire at all if I use the toolbar context menu.

    Clues?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ToolsCustomize (Word 2000)

    Is it possible that "context" is the key word? Have you replaced the customize command on the shortcut menu as well?
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ToolsCustomize (Word 2000)

    If I'm editing the template containing the replacement ToolsCustomize macro, then I'm always IN the template context.

    So context isn't an issue. The finished product would be in a startup add-in and so should always fire no matter what template/normal document I'm in. But during development, I see the described behavior when I'm only editing the template directly. In such a case, there is only one context: Template.

    The command should be the same if it's called from the toolbar menu (right click, customize) or from the Tools menu, or from the list of All Commands in Tools Macro. It isn't from what I'm seeing the right click on toolbar fires something other than the template context ToolsCustomize.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ToolsCustomize (Word 2000)

    Perhaps it's easier to demonstrate than to explain.

    Open the attached ZIP, extract and open the template TEST.DOT for editing.

    You'll see a command bar, click it. You'll get the replacement ToolsCustomize. Go to the Tools menu, select Customize. You'll get the replacement.

    Now right click on the command bar, select customize. You'll get the internal Word ToolsCustomize.

    You shouldn't.
    Attached Files Attached Files

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

    Re: ToolsCustomize (Word 2000)

    We have all been here before... (CSN. Name the tune)

    Guy,

    You can use

    application.CommandBars("Toolbar List").Enabled = false

    to deny access the right-click toolbar context menu. (And thereby force your users to use the menu.)

    But, alas, you cannot stop the double-click access method. D-click an blank area of the toolbar area and there it is: the customize dialog.

    So, unless MS has some undocumented method for doing this, you is stuck.
    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>

  6. #6
    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: ToolsCustomize (Word 2000)

    Kevin, how did you find that commandbar name? (I trolled the list, but didn't come up with that one. "Word for Windows 2.0" was on the list - that sounds interesting!)

    Probing the controls returned a Control ID of 797 for the Customize... item on that toolbar. In fact, it's the same ID for the Tools menu's Customize... item.

    An event handler to intercept by ID might solve the problem. (I've done this in an Outlook add-in for the Insert|File command but it's arduous to explain it and Guy probably knows.)

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ToolsCustomize (Word 2000)

    <hr>An event handler to intercept by ID might solve the problem. (I've done this in an Outlook add-in for the Insert|File command but it's arduous to explain it and Guy probably knows.) <hr>

    Umm.. Well, no he doesns't.

    If you look in the Word forum you'll see a recent post of mine FixContext Startup Add-in (Word 97/2000/XP)

    This is the add-in I'm fiddling with that would benefit from some workaround to ToolsCustomize being different on menu and on command bar... If you can give me a hint about intercepting by ID I'd appreciated it.

  8. #8
    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: ToolsCustomize (Word 2000)

    Try <!post=Post #92036,92036>Post #92036<!/post> for a sample. Too zonked to add to that discussion tonight.

  9. #9
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ToolsCustomize (Word 2000)

    Thanks. I'll take a look. Could work.

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

    Re: ToolsCustomize (Word 2000)

    I found it quite annoying, actually. I think Guy is annoyed too. Three ways to open the Customize dialog and only two can be trapped.

    No offense, but I don't think intercepting the ID will do it. However, I'll gladly be corrected if you figure out a way. Be sure to post back. I'll lobby heavily for a star post for you if you can pull this off.

    p.s. Gary showed me "Toolbar list" yars ago.
    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>

  11. #11
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ToolsCustomize (Word 2000)

    Success. Adapting the code supplied by Jefferson, I have a Startup Add-in that will trap the id for ToolsCustomize and fire the replacement.

    Very cool.

    Now what's the ID for ToolsCustomizeKeyboard. It can be fired from a menu, or from formatStyle or from Toolscustomize. Could be this method would work here as well.
    Attached Files Attached Files

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

    Re: ToolsCustomize (Word 2000)

    What happends when you double-click the empty toolbar area? Does the customize dialog appear?
    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>

  13. #13
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ToolsCustomize (Word 2000)

    No luck. It does not fire the replacement, it displays the normal ToolsCustomize.

    Still, 3 out of four is better than 2 out of four. And I suspect the right click is more often used than the double click on a blank area of the toolbar. I usually don't have any blank area...

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

    Re: ToolsCustomize (Word 2000)

    Just didn't want you to be surprised. And thanks for posting your code. Doesn't work in Word 97 though: "Object does not source automation events." Bummer.
    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>

  15. #15
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ToolsCustomize (Word 2000)

    Where does the error come in Word 97? Is there a way to trap it? I'd like FixDot to work on 97-XP -- without two templates.

    Hmmn. Break out the laptop with 97 and see what happens.

Page 1 of 2 12 LastLast

Posting Permissions

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