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

    Commandbar Presidence (Word 97SR2)

    I've run aground a bit here. When a global app starts due to its presence in the Word startup folder, how does Word determine which commandbars (specifically the Standard and Formatting toolbars) to display if the global these modified, but Normal.dot does not.

    I want the modified toolbars to display but I get the Normal.dot vanilla toolbars.
    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>

  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: Commandbar Presidence (Word 97SR2)

    Based on my limited experience (Word 2000), it appears that Word tries to "merge" things I've added in my global standard toolbar into semi-appropriate places, but doesn't delete things that are on the Normal.dot standard toolbar that I deleted from my global standard toolbar. So...code might be required.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Commandbar Presidence (Word 97SR2)

    I've experienced this for years. I still have a tiny buttonless "Web" toolbar appear from time to time. It is the remnant of a Standard toolbar in one of my global aps.

    I believe that the only way for us users to determine how/what/why Word97SR2 does what it does is to mount a controlled experiment.

    In your case, renaming/deleting your Startup folder, renaming/deleting your Normal.dot, Creating a template with a Standard toolbar in a new startup folder, modifying the standard toolbar in Normal, and taking it from there.

    I did some work a month or two ago to see what macros were visible from where. Took me ages.

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

    Re: Commandbar Presidence (Word 97SR2)

    A key word in your post: "merge". Bells are ringing and light bulbs of the mind are blinking. I think you are correct. As I recall Word maintains a single "Standard" toolbar. If a template makes changes to "its" Standard toolbar, those changes are applied to the "Word Singular Amalgamated Built-in Toolbar Set".

    I think my problem then, is the false assumption that my code to reset the Normal template's Standard and Formatting toolbars is really resetting the above mentioned WSABTS toolbar.

    ...which leads to another question: If user's mess up their toolbars (no, they are not customizing, they are messing them up -- accidentally), how do I reset them? Their changes MUST be stored in Normal since they cannot write to the global. So I really need to reset the "Normal template toolbars" before the global loads and applies its changes to the WSABTS. Oy!

    Of, course, you already gave the answer: write some code. And I'll add "that executes at run time and verifies that all the necessary buttons are present and accounted for."
    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>

  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: Commandbar Presidence (Word 97SR2)

    Chris,

    I figured out what was happening. See the post above in response to Jeff's post.

    Thanks for your input. Maybe my recent re-discovery will help in your situation too.
    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
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Commandbar Presidence (Word 97SR2)

    Singular Amalgamated Bloated Ordinal Toolbar Accumulating Global Entity is the formal term, I believe.

    A starting assumption (and only an assumption) would be that Word constructs the Standard as it is ferreting out stuff from Global toolbars during the startup process. That would suggest that the same code has to be executed as each new template is added manually via Tools, Templates, Add.

    That is, if you renamed your Startup folder, and then did the add-ins manually, rather than letting Word do it, you'd see the corruption creeping in, no?

    If my assumption is proved correct, then there ought to be little that one can do to prevent this automated corruption of Standard, except to go back to the root cause - how are the (presumably) global/startup templates corrupting their Standard components? That is, writing code to verify all is correct at run time is bolting the Standard door after the pigs have bolted their food.

    As long as global Standard toolbars are corrupt, Word is going to make a pigs trough out of it all each time Word is loaded and churns through the Startup templte set, no?


    Thanks for the heads up on your posting.

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

    Re: Commandbar Presidence (Word 97SR2)

    Ok, I tried your suggestion. I start Word without the global app. I add the global to the add-ins, and what do I get?

    I get the global toolbar, but I don't get the global changes to the Standard and Formatting and Menu Bar toolbars.

    This is driving me nuts. Like so many other posters I have to say "this use to work fine." It appears the changes made to the global template (when I execute the MakeToolBars code) are being made to Normal and not the global template.

    I've got

    CustomizationContext = thisdocument

    I've tried various syntactical variations, like

    CustomizationContext = thisdocument.attachedtemplate

    or

    CustomizationContext = activedocument.attachedtemplate

    but nothing changes the outcome. Any ideas?
    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>

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Commandbar Presidence (Word 97SR2)

    >I get the global toolbar, but I don't get the global changes to the Standard and Formatting and Menu Bar toolbars.

    Manual accumulation of templates bypasses internal code that takes place during automated/startup accumulation. Huh?

    Let me see if I understand the scenario before I repeat the experiment.

    1) I have a Normal.dot with a customised Standard toolbar.

    2) I create a template "Temp" , and make changes to Temp's Standard toolbar electing to save the changes in Temp.

    3) I exit Word, and drag Temp.dot to my startup location (as in Tools, Options, FileLocations, Startup)

    4) I reload Word, and when the churning stops, expect to see my changes to Temp's Standard toolbar in effect.

    However

    5) If I then exit Word, Rename Startup folder, reload Word and then Tools, Templates, Add my temp.dot I won't see the my changes to Temp's Standard toolbar in effect>

    Is that what's happening to you?




    (I read that your users templates toolbars are corrupted accidentally, but I wouldn't expect that to cause different behaviour in Word than when I "corrupt" the Standard toolbar intentionally).

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

    Re: Commandbar Presidence (Word 97SR2)

    >>1) I have a Normal.dot with a customized Standard toolbar.

    No. I have a normal.dot with Word default toolbars as MS delivers them. Users may add new toolbars which will store in Normal, but they cannot modify the built-in toolbars. Remember, (if nobody else wants to take credit for this Rule, I will: no company customizations are ever to be made to user Normal.dot files)

    2). Correct
    3). Correct
    4). Correct
    5). Not quite. When the global is no longer loaded, the customizations are still there! Apparently they were applied to the user's Normal template (despite my attempts to keep the customizations in the global). Delete the user's normal, then restarte Word -- no customizations to the toolbar.

    As an experiment, I created a document based on my global template. I copied the toolbar code to the document and changed the customizationcontext to

    Activedocument.AttachedTemplate.

    The code ran fine, but the customizations sure did not stick in the global. They were made again to the Normal.

    p.s. The global project is NOT protected with a password, not in a read only LAN folder has I have full permissions to it -- as I always have. Also , I get no error messages at any point in the process.

    Chris, thanks for you interest in helping me. Right now, I'm about set to include a statement in the global startup routine to call the Toolbar code and have it create the toolbars at runtime. I never had to do this before: the global toolbars just layered over the normal toolbars. Times they are a changin' (and for no particular reason)! And this action breaks my Rule above!
    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>

  10. #10
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Commandbar Presidence (Word 97SR2)

    > the false assumption that my code to reset the Normal template's Standard and Formatting toolbars is really resetting the above mentioned WSABTS toolbar.

    I didn't try this. Are you suggesting that VBA code to say "reset the Standard toolbar" will obliterate changes to the WSABTS? (I still think mine is a better acronym!)? That can't happen, not permanently. Suppose I had a Temp1.dot floating around that had corrupted/changed the WSABTS Standard toolbar, and I ran VBA code to obliterate those changes. Then AddingIn a Temp2.dot would bring in fresh changes to the WSABTS toolbar, so I'd need to rerun the VBA code again.

    Since the user can effect Addins at any time, I could never be guaranteed a standard toolbar.

    (In my experiments to date I haven't tried adding different versions of the same macro in different templates, but that was the root of my experiment two months ago: Suppose macro1 with Msgbox "Hello1" in Temp1.dot with a smiley toolbar button for Standard toolbar stored in Temp1.dot. Suppose macro1 (yes, "1") with Msgbox "Hello2" in Temp2.dot with a smiley toolbar button for Standard toolbar stored in Temp2.dot. Addin both templates and click the Smiley button. Do you see "Hello1" or "Hello2"?)


    >5). Not quite. When the global is no longer loaded, the customizations are still there!

    My notes below on my first simple experiment. So far I can't duplicate your effects in (5).



    1. I Dragged all templates from my StartUp directory to a spare directory.
    2. I deleted all copies of Normal.dot and loaded WinWord.exe getting a vanilla Normal.dot.
    3. I note that no templates appear in my Tools, TemplatesAddIns listbox.
    4. I created a template and saved it as Temp.dot.
    5. While in the template I View, Toolbars, Customize, Commands, Fonts, SaveIn Normal.dot and drag WPIconic to the Standard Toolbar.
    6. I save and close temp.dot, noting that WPIconic is still in the Standard Toolbar.
    7. I exit Word, electing to save changes to Normal.dot.
    8. I reload Word, noting that WPIconic is still in the Standard Toolbar.
    9. I exit Word.
    10. I Move/Drag Temp.DOT to my Startup directory.
    11. I reload Word and note that temp.Dot has been loaded to the Addins list and that WPIconic appears in the Standard toolbar.
    12. When I uncheck the Temp.dot, the Standard toolbar is still holding WPIconic, which is what I expect, since I saved in Normal.dot.

    Now I repeat the entire exercise, but in step (5) above I will save in temp.dot rather than in Normal.dot,
    1. I Dragged all templates from my StartUp directory to a spare directory.
    2. I deleted all copies of Normal.dot and loaded WinWord.exe getting a vanilla Normal.dot.
    3. I note that no templates appear in my Tools, TemplatesAddIns listbox.
    4. I created a template and saved it as Temp2.dot.
    5. While in the template I View, Toolbars, Customize, Commands, Fonts, SaveIn TEMP2.dot and drag SYMBOL to the Standard Toolbar.
    6. I save and close TEMP2.dot, noting that Symbol is no longer in the Standard Toolbar.
    7. I exit Word, electing to save changes to Normal.dot.
    8. I reload Word, noting that SYMBOL is still no longer in the Standard Toolbar.
    9. I exit Word.
    10. I Move/Drag TEMP2.dot to my Startup directory.
    11. I reload Word and note that TEMP2.dot has been loaded to the Addins list and that SYMBOL appears in the Standard toolbar.
    12. When I uncheck the Temp.dot, the Standard toolbar is no longer holding SYMBOL, which is what I expect, since I saved in TEMP2.dot.

    So far Word97SR2 is behaving just as I would expect.
    I'm not VBA-Programming changes to my toolbars, I'm using the menu and mouse to effect changes.

    If I elect to save a Toolbar customization in Normal.dot, it appears all the time; If I elect to save the change in a Temp.dot, it appears only when the Temp.dot is visible.

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

    Re: Commandbar Presidence (Word 97SR2)

    Nice work. I will attempt today to replicate your moves and post back my results. Sammy had a good idea (See the Commandbar Agony thread), but I tried making the changes and no dice.
    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>

Posting Permissions

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