Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Adding CommandBarPopup into the a specific Inspctor (http://www.outlookbanter.com/add-ins-outlook/5784-adding-commandbarpopup-into-specific-inspctor.html)

Michael Reukauff January 25th 06 02:15 PM

Adding CommandBarPopup into the a specific Inspctor
 
Hi

I want to add a CommandBarPopup with some ComandBarButtons to the Inspectors
Menu. But this menu should only appear when the inspector is showing an
e-mail. I am using VS2005 and the VSTO 2005. Right now I create the
CommandBarPopup in the newInspector_Event. But this event is fired only
once, or am I missing something.

What I need is an event which is fired when the Inspector opens up a new
window to show an e-mail, contact etc.

So, how I can I show the menu only when the inspector is showing an e-mail?

Thanks
Michael



Ken Slovak - [MVP - Outlook] January 25th 06 02:34 PM

Adding CommandBarPopup into the a specific Inspctor
 
Use NewInspector. Inspector.CurrentItem.Class = olMail would do the trick.
Test for that before you do anything else to see if you want to handle that
Inspector.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Michael Reukauff" wrote in message
...
Hi

I want to add a CommandBarPopup with some ComandBarButtons to the
Inspectors Menu. But this menu should only appear when the inspector is
showing an e-mail. I am using VS2005 and the VSTO 2005. Right now I create
the CommandBarPopup in the newInspector_Event. But this event is fired
only once, or am I missing something.

What I need is an event which is fired when the Inspector opens up a new
window to show an e-mail, contact etc.

So, how I can I show the menu only when the inspector is showing an
e-mail?

Thanks
Michael



jim January 25th 06 02:39 PM

Adding CommandBarPopup into the a specific Inspctor
 
Hi Michael how are you add the newInspector event?
Sometimes if you add an event and the object you are adding it to goes
out of scope you will lose the event.
So one thing you could do is declare Outlook.Inspectors _inspectors as
global scope and add the event this way.
Hope this helps.

Michael Reukauff wrote:
Hi

I want to add a CommandBarPopup with some ComandBarButtons to the Inspectors
Menu. But this menu should only appear when the inspector is showing an
e-mail. I am using VS2005 and the VSTO 2005. Right now I create the
CommandBarPopup in the newInspector_Event. But this event is fired only
once, or am I missing something.

What I need is an event which is fired when the Inspector opens up a new
window to show an e-mail, contact etc.

So, how I can I show the menu only when the inspector is showing an e-mail?

Thanks
Michael



jim January 25th 06 02:40 PM

Adding CommandBarPopup into the a specific Inspctor
 
Hi Michael how are you add the newInspector event?
Sometimes if you add an event and the object you are adding it to goes
out of scope you will lose the event.
So one thing you could do is declare Outlook.Inspectors _inspectors as
global scope and add the event this way.
Hope this helps.

Michael Reukauff wrote:
Hi

I want to add a CommandBarPopup with some ComandBarButtons to the Inspectors
Menu. But this menu should only appear when the inspector is showing an
e-mail. I am using VS2005 and the VSTO 2005. Right now I create the
CommandBarPopup in the newInspector_Event. But this event is fired only
once, or am I missing something.

What I need is an event which is fired when the Inspector opens up a new
window to show an e-mail, contact etc.

So, how I can I show the menu only when the inspector is showing an e-mail?

Thanks
Michael



Michael Reukauff January 25th 06 03:13 PM

Adding CommandBarPopup into the a specific Inspctor
 
Hi Ken

Thanks for your fast answer.

Where should I check this? In the NewInspector Event? I did this and it
doen't work at all. The NewInspector event is only fired once on my system
(Outlook 2003).

What I need is an event like Inspector_Activate, but this doesn't exists.

When I read at first an e-mail, the CommandBarPopup is in every menu. If
read at first a contact, then the menu is missing, but when I open up an
e-mail, the menu appears again in every inspector.

Thanks
Michael


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Use NewInspector. Inspector.CurrentItem.Class = olMail would do the trick.
Test for that before you do anything else to see if you want to handle
that Inspector.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Michael Reukauff" wrote in message
...
Hi

I want to add a CommandBarPopup with some ComandBarButtons to the
Inspectors Menu. But this menu should only appear when the inspector is
showing an e-mail. I am using VS2005 and the VSTO 2005. Right now I
create the CommandBarPopup in the newInspector_Event. But this event is
fired only once, or am I missing something.

What I need is an event which is fired when the Inspector opens up a new
window to show an e-mail, contact etc.

So, how I can I show the menu only when the inspector is showing an
e-mail?

Thanks
Michael





Michael Reukauff January 25th 06 04:39 PM

Adding CommandBarPopup into the a specific Inspctor
 
Hi Jim

Thanks, that's it. I didn't remember this fact, but I know about this.

Thanks again
Michael

"Jim" wrote in message
...
Hi Michael how are you add the newInspector event?
Sometimes if you add an event and the object you are adding it to goes out
of scope you will lose the event.
So one thing you could do is declare Outlook.Inspectors _inspectors as
global scope and add the event this way.
Hope this helps.

Michael Reukauff wrote:
Hi

I want to add a CommandBarPopup with some ComandBarButtons to the
Inspectors Menu. But this menu should only appear when the inspector is
showing an e-mail. I am using VS2005 and the VSTO 2005. Right now I
create the CommandBarPopup in the newInspector_Event. But this event is
fired only once, or am I missing something.

What I need is an event which is fired when the Inspector opens up a new
window to show an e-mail, contact etc.

So, how I can I show the menu only when the inspector is showing an
e-mail?

Thanks
Michael




Ken Slovak - [MVP - Outlook] January 25th 06 08:56 PM

Adding CommandBarPopup into the a specific Inspctor
 
Ummm. NewInspector fires every time a new Inspector is added to the
Inspectors collection. There certainly is an Inspector.Activate event but
before you could handle that you'd need to handle NewInspector to get a
handle to the new Inspector.

Use the Object Browser to see what properties, methods and events are
available to you for any object or collection.

If NewInspector doesn't fire for every new added Inspector then you are
doing something drastically wrong.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Michael Reukauff" wrote in message
...
Hi Ken

Thanks for your fast answer.

Where should I check this? In the NewInspector Event? I did this and it
doen't work at all. The NewInspector event is only fired once on my system
(Outlook 2003).

What I need is an event like Inspector_Activate, but this doesn't exists.

When I read at first an e-mail, the CommandBarPopup is in every menu. If
read at first a contact, then the menu is missing, but when I open up an
e-mail, the menu appears again in every inspector.

Thanks
Michael



Michael Reukauff January 26th 06 08:07 AM

Adding CommandBarPopup into the a specific Inspctor
 
Hi Ken

Yes, it was my mistake. See my other posting to Jim.

Thanks for your help.
Michael

"Ken Slovak - [MVP - Outlook]" wrote in message
...
Ummm. NewInspector fires every time a new Inspector is added to the
Inspectors collection. There certainly is an Inspector.Activate event but
before you could handle that you'd need to handle NewInspector to get a
handle to the new Inspector.

Use the Object Browser to see what properties, methods and events are
available to you for any object or collection.

If NewInspector doesn't fire for every new added Inspector then you are
doing something drastically wrong.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Michael Reukauff" wrote in message
...
Hi Ken

Thanks for your fast answer.

Where should I check this? In the NewInspector Event? I did this and it
doen't work at all. The NewInspector event is only fired once on my
system (Outlook 2003).

What I need is an event like Inspector_Activate, but this doesn't exists.

When I read at first an e-mail, the CommandBarPopup is in every menu. If
read at first a contact, then the menu is missing, but when I open up an
e-mail, the menu appears again in every inspector.

Thanks
Michael






All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com