Discussion:
Toolbar-Problem
(too old to reply)
p***@gmx.net
2005-08-25 19:57:59 UTC
Permalink
Hello,

In Word97 I create a Toolbar (x=Application.CommandBars.Add) with a
single Button on it (x.Controls.Add). I have further an Add-In
"addin1.dot" in the StartUp-Fodler with a module "Module1" which
contains a procedure "Proc1" itsself. If someone clicks the button the
"Proc1"-procedure should be executed.

Now there is the problem that after the first-time installation of the
toolbar the desired effect doesn't occur in most trials. So I have to
remove the Toolbar, create it again and after several times of doing
this, the Proc1-prodecure is executed. Before there is no action when
the button ic clicked.

By the way: There is no difference if I use >OnAction =
"Module1.Proc1"< or >OnAction = "Proc1"< when creating the toolbar.
Only >OnAction = "addin1.dot!Module1.Proc1"< semms not running
constantly.

Does anybody know why there is such an unpredictable behavior of the
action, so that it sometimes works and often none? What to do that it
works the right way?

Kind Regards,
Nachtigall
Word Heretic
2005-09-13 00:19:01 UTC
Permalink
G'day ***@gmx.net,

I find it easier to build the toolbar as a permanent member of the
template, and just show or hide it as required.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice
Post by p***@gmx.net
Hello,
In Word97 I create a Toolbar (x=Application.CommandBars.Add) with a
single Button on it (x.Controls.Add). I have further an Add-In
"addin1.dot" in the StartUp-Fodler with a module "Module1" which
contains a procedure "Proc1" itsself. If someone clicks the button the
"Proc1"-procedure should be executed.
Now there is the problem that after the first-time installation of the
toolbar the desired effect doesn't occur in most trials. So I have to
remove the Toolbar, create it again and after several times of doing
this, the Proc1-prodecure is executed. Before there is no action when
the button ic clicked.
By the way: There is no difference if I use >OnAction =
"Module1.Proc1"< or >OnAction = "Proc1"< when creating the toolbar.
Only >OnAction = "addin1.dot!Module1.Proc1"< semms not running
constantly.
Does anybody know why there is such an unpredictable behavior of the
action, so that it sometimes works and often none? What to do that it
works the right way?
Kind Regards,
Nachtigall
Loading...