Results 1 to 10 of 10
  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 Agony (Word 97SR2)

    Sorry, I just have to start a new thread on this.

    I have code that recreates the Standard, Formatting and Menu Bar commandbars to company standards. Runs fine. The toolbars are summarily modified and look greate. The code is attached.

    Exit Word. Delete Normal.dot. Restart Word. The global app starts but no modifications are made to any of the above mentioned toolbars -- they remain as Word defaults. The code, then, seems to be applying the commandbar changes to Normal despite my efforts to make sure they are applied to the global.

    What am I doing wrong?
    Attached Files Attached Files
    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
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Commandbar Agony (Word 97SR2)

    Kevin, the properties that you are using like CommandBars can refer to either a document or an application. I think that Application is the default, so if you prefix them with "ActiveDocument.", then it might work OK. HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

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

    Re: Commandbar Agony (Word 97SR2)

    Ohhhhhh. Sam, I think you just made me feel about this <img src=/w3timages/censored.gif alt=censored border=0> small. I haven't tried updating the code, but I just bet that's the whole problem. The strangest thing though, is the code worked fine for *years* (I know, I know, we hear that all the time). I do a periodic bloat clean procedure that includes moving everthing to a new blank template. (Yes, even the "Save in Word 2002" technique and the Payne Code Cleaner don't clean as well as a brand new template.) After that, the toolbar problems cropped up.

    Well, this'll be interesting. I had to update the app and push it to the user kingdom last night, so I violated my Rule #1: never make company specific changes to users' normal.dot files.

    Thanks for your attention to my problem. Much appreciated.
    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>

  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 Agony (Word 97SR2)

    Well, shoot! Didn't work. I changed all the commandbar parent objects to Activedocument and ran the code. It still puts all the changes in Normal, not the global from which the code executes.

    Signed,

    Stuck in Lodi.
    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
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Commandbar Agony (Word 97SR2)

    Kevin,

    This may be a long shot but how about changing the line

    CustomizationContext = ThisDocument

    to

    CustomizationContext = ThisDocument.AttachedTemplate ' (or ActiveDocument..)

    Andrew

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

    Re: Commandbar Agony (Word 97SR2)

    Andrew,

    I've been trying variations on that theme. Still banging on it though...

    Nothing yet.
    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>

  7. #7
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Commandbar Agony (Word 97SR2)

    Sorry Kevin,

    I Ihave given up on the vagaries of the all pervasive Normal.dot, seems to me some witchcraft is required when dealing with it.

    Andrew

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

    Re: Commandbar Agony (Word 97SR2)

    Ok. I'm still in the fight. I'll report back as soon as the beast is dead.

    Signed,

    Perservering on the front lines.
    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>

  9. #9
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Commandbar Agony (Word 97SR2)

    One more grope in the dark, I have not fully studied your code, but looking at

    CustomizationContext = NormalTemplate
    ThisDocument.Save

    I wonder does that save all changes to Normal.dot, and not the active template ?

    Andrew

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

    If I leave off the thisdocument.save, then I just click the save button in the IDE -- that surely should save changes to the template. But for some reason, the commandbar changes are going to normal no matter what.

    The routine that makes the changes to the template toolbars starts off with

    CustomizationContext = activedocument.attachedtemplate

    I used to successfully use

    CustomizationContext = thisdocument

    Seems to me they are functionally the same thing.
    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
  •