Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Adding CommandBarPopup into the a specific Inspctor

Geek News

Adding CommandBarPopup into the a specific Inspctor
"Michael Reukauff" <mreu[ at ]newsgroup.nospam> 1/25/2006 2:15:35 PM
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


Re: Adding CommandBarPopup into the a specific Inspctor
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 1/25/2006 2:34:30 PM
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" <mreu[ at ]newsgroup.nospam> wrote in message
news:uJi5QnbIGHA.2912[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> 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
>

Re: Adding CommandBarPopup into the a specific Inspctor
Jim <rog_21[ at ]yahoo.com> 1/25/2006 2:39:31 PM
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:
[Quoted Text]
> 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
>
>
Re: Adding CommandBarPopup into the a specific Inspctor
Jim <rog_21[ at ]yahoo.com> 1/25/2006 2:40:10 PM
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:
[Quoted Text]
> 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
>
>
Re: Adding CommandBarPopup into the a specific Inspctor
"Michael Reukauff" <mreukauff[ at ]gmx.net> 1/25/2006 3:13:07 PM
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]" <kenslovak[ at ]mvps.org> wrote in message
news:ufNQFzbIGHA.2320[ at ]TK2MSFTNGP11.phx.gbl...
[Quoted Text]
> 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" <mreu[ at ]newsgroup.nospam> wrote in message
> news:uJi5QnbIGHA.2912[ at ]tk2msftngp13.phx.gbl...
>> 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
>>
>


Re: Adding CommandBarPopup into the a specific Inspctor
"Michael Reukauff" <mreukauff[ at ]gmx.net> 1/25/2006 4:39:14 PM
Hi Jim

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

Thanks again
Michael

"Jim" <rog_21[ at ]yahoo.com> wrote in message
news:%23yzC%230bIGHA.648[ at ]TK2MSFTNGP14.phx.gbl...
[Quoted Text]
> 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


Re: Adding CommandBarPopup into the a specific Inspctor
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 1/25/2006 8:56:36 PM
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" <mreukauff[ at ]gmx.net> wrote in message
news:%23ZqNaHcIGHA.1192[ at ]TK2MSFTNGP11.phx.gbl...
[Quoted Text]
> 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

Re: Adding CommandBarPopup into the a specific Inspctor
"Michael Reukauff" <mreukauff[ at ]gmx.net> 1/26/2006 8:07:52 AM
Hi Ken

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

Thanks for your help.
Michael

"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> wrote in message
news:uOnbZHfIGHA.2668[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> 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" <mreukauff[ at ]gmx.net> wrote in message
> news:%23ZqNaHcIGHA.1192[ at ]TK2MSFTNGP11.phx.gbl...
>> 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
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net