Joe Zuffoletto
Posts: 21
Joined: 2005-11-07
|
I install my Word addin and open word. My command bar and its command buttons are visible and everything works fine. Then I quit and restart Word. The command bar remains but the command buttons are gone. See enclosed screen shot.
This is happening on my dev box and my customers' machines. Windows XP, Office 2003, .NET Framework 1.1, all updates applied.
Any ideas?
Thanks - Joe
|
|
Brad Smith
Posts: 49
Joined: 2005-11-22
|
If you uninstall your add-in and then start Word, does the empty toolbar still appear? I've seen this before where a custom toolbar has become "permanent". You can delete it by right-clicking in an empty spot in a toolbar and choose "Customize". Then remove your custom toolbar and re-install your add-in.
In my add-in code, I usually look for the existence of my custom controls before adding them and either re-using or (more typically) delete the wreckage. If my theory holds, what's happening in your code is you're trying to add your toolbar, which is failing because it's already there. At that point your attempt to add controls to it is failing, resulting in what you're seeing.
Brad. |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Joe.
I agree with Brad. Could you please check the Temporary property of your controls? It should have the same value as the command bar.
One more thing. I would advise you to use the Organizer dialog to remove your command bar manually in Word (if it is there). The fact is that sometimes Word doesn't remove command bars from the Normal.dot template and they still remain when you start Word next time. |
|
Joe Zuffoletto
Posts: 21
Joined: 2005-11-07
|
Thanks to everyone for your suggestions. Here's what I did:
1. Attempted to remove my toolbar from Word using the organizer. Although the toolbar was visible in Word, it was not visible in the organizer. Normal.dot was empty.
2. Verified that the Temporary property for the command bar and its controls was the same (true).
3. Quit Word and uninstalled my toolbar using Add/Remove programs.
4. Verified in Regedit that all entries for my addin were gone.
5. Reinstalled my addin.
6. Ran Word. My addin was there and worked normally.
7. Quit and restarted Word. The command bar appears but has no controls. |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Joe.
Attempted to remove my toolbar from Word using the organizer. Although the toolbar was visible in Word, it was not visible in the organizer. Normal.dot was empty.
Probably the toolbar is stored in another template.
Do you use any template-based documents in Word?
Could you please reiterate the steps above one more time with the Temporary = false? |
|
Joe Zuffoletto
Posts: 21
Joined: 2005-11-07
|
I have a number of templates on my machine but couldn't find my toolbar in any of them.
Sergey Grischenko wrote:
Could you please reiterate the steps above one more time with the Temporary = false?
This put the toolbar into Normal.dot and solved the problem - the controls now appear the way they're supposed to. |
|