hi
This I hope is an easy answer.... but I haven't been able to figure out how
to do this.
I have a Word addin that I need a tool bar for ... I created code to add the
toolbar and it works fine... I added it to the AutoExec routine. So when
the addin is loaded I check for the tool bar and if it's not there I creat
it. On unload I remove the addin.
Problem one: It seems that through this code the toolbar is added to the
normal template? Because when I unload the template or if the user should
remove the .dot file without unloading the a new toolbar appears in the
normal.dot file. I can't remove the toolbar without over-writing the
normal.dot file?
Question: How can I insure the toolbar is only added to the .dot file (or my
addin).
Whatelse I tried to do:
After playing with all kinds of tricks I decided to just add the tool bar
into the doc file and save it as a dot file. This seems to work but exposed
one problem.....
If the user is silly enough to 'delete the custom toolbar' it gets removed
from the addin (.dot file). When the user closes Word you get prompted to
save changes in the addin. If they say yes they loose the addin toolbar and
can't get it back (easily).
So question are:
1. How can I via code add or make sure I have the toolbar I need but it has
to be attached to the .dot file (not the normal.dot file)?
2. If I have a toolbar in an addin how do I stop the user from deleting it?
note: I tried setting the protection on the toolbar but it doesn't stop you
from deleting a toolbar
Please any help appreciated......
Chris.
This I hope is an easy answer.... but I haven't been able to figure out how
to do this.
I have a Word addin that I need a tool bar for ... I created code to add the
toolbar and it works fine... I added it to the AutoExec routine. So when
the addin is loaded I check for the tool bar and if it's not there I creat
it. On unload I remove the addin.
Problem one: It seems that through this code the toolbar is added to the
normal template? Because when I unload the template or if the user should
remove the .dot file without unloading the a new toolbar appears in the
normal.dot file. I can't remove the toolbar without over-writing the
normal.dot file?
Question: How can I insure the toolbar is only added to the .dot file (or my
addin).
Whatelse I tried to do:
After playing with all kinds of tricks I decided to just add the tool bar
into the doc file and save it as a dot file. This seems to work but exposed
one problem.....
If the user is silly enough to 'delete the custom toolbar' it gets removed
from the addin (.dot file). When the user closes Word you get prompted to
save changes in the addin. If they say yes they loose the addin toolbar and
can't get it back (easily).
So question are:
1. How can I via code add or make sure I have the toolbar I need but it has
to be attached to the .dot file (not the normal.dot file)?
2. If I have a toolbar in an addin how do I stop the user from deleting it?
note: I tried setting the protection on the toolbar but it doesn't stop you
from deleting a toolbar
Please any help appreciated......
Chris.