M
Mel Green
Hey guys,
I've written an addin for Word that loads a new toolbar with a button. It's
fairly simple and works great.
A problem I've run into however is that when Outlook uses Word as its email
editor inside its 'Create New Email' window, Word will load my addin which
will create the toolbar and button inside this window. Since my toolbar and
button have nothing to do with Outlook and serve no purpose there, I'd like
to be able to tell when my addin loads whether or not Word is running inside
Outlook, then I could defer from loading my toolbar.
I've tried doing this by checking the 'UserControl' property of the
WordApplication COM object, which works in that it detects when Word is
opened inside Outlook, in which case I can not create my toolbar. But the
problem with this approach is that if I've opened Outlook before I open Word
regularly, the 'UserControl' property is still set to "false", which causes
my code not to load the toolbar inside Word like it should.
If anyone knows of another method of accomplishing this, or a better way of
using the method I've got, please let me know. I would greatly appreciate any
advise on this subject!
~Mel
I've written an addin for Word that loads a new toolbar with a button. It's
fairly simple and works great.
A problem I've run into however is that when Outlook uses Word as its email
editor inside its 'Create New Email' window, Word will load my addin which
will create the toolbar and button inside this window. Since my toolbar and
button have nothing to do with Outlook and serve no purpose there, I'd like
to be able to tell when my addin loads whether or not Word is running inside
Outlook, then I could defer from loading my toolbar.
I've tried doing this by checking the 'UserControl' property of the
WordApplication COM object, which works in that it detects when Word is
opened inside Outlook, in which case I can not create my toolbar. But the
problem with this approach is that if I've opened Outlook before I open Word
regularly, the 'UserControl' property is still set to "false", which causes
my code not to load the toolbar inside Word like it should.
If anyone knows of another method of accomplishing this, or a better way of
using the method I've got, please let me know. I would greatly appreciate any
advise on this subject!
~Mel