![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
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 |
#5
|
|||
|
|||
![]()
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 |
#6
|
|||
|
|||
![]()
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 |
#7
|
|||
|
|||
![]()
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 |
#8
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
have server reply using a specific message | Terry | Outlook - Installation | 2 | March 7th 06 01:00 PM |
Replys sent to a specific folder? | Bob Newman | Outlook - General Queries | 6 | February 7th 06 04:25 PM |
deliver mails to a specific account | mireillea | Outlook - General Queries | 1 | February 2nd 06 02:51 PM |
deliver mails to a specific account | mireillea | Outlook - General Queries | 0 | February 2nd 06 12:31 PM |
Specific Date(s) Reminders | Ascendor | Outlook - Calandaring | 1 | January 9th 06 07:09 PM |