![]() |
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
|
|||
|
|||
![]()
I've got a COM addin that adds a toolbar to Outlook inspectors.
In another process I call the Simple MAPI MAPISendMail function. When the new e-mail dialog pops up, my addin toolbar does not appear. I figured out that the same behavior happens if I open up a new send e-mail dialog via the send to mail shell context menu. I heard a long time ago that in some cases Outlook opens in a mode where no addins are loaded. However, even if Outlook is already running (in which case my addin is already loaded), my addin toolbar does not appear. I ran through it with a debugger, and none of my code is hit for this particular inspector. What if I use Extended MAPI to do this? Since it happens for both Simple MAPI and the shell send to mail context menu, I'm assuming that it won't work for Extended MAPI either. Is there something else I can do about this or is it just a limitation of Outlook? Thanks Mark Smith |
Ads |
#2
|
|||
|
|||
![]()
When a Simple MAPI message is opened by Outlook any addins will run if
Outlook is running already, and if the addin is correctly written it will run even if Outlook wasn't previously running. It all depends on how the addin is written and what it does when OnConnection is fired. A new Inspector opened from a Simple MAPI message is added to the Inspectors collection, but it doesn't fire the Inspectors.NewInspector() event. Since that's how most code will discover an Inspector was opened the code won't know about the new Inspector, unless you scan the Inspectors collection and account for any open Inspectors that aren't already being handled. Using Extended MAPI won't help with this, the limitations would be the same. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Mark Smith" wrote in message ... I've got a COM addin that adds a toolbar to Outlook inspectors. In another process I call the Simple MAPI MAPISendMail function. When the new e-mail dialog pops up, my addin toolbar does not appear. I figured out that the same behavior happens if I open up a new send e-mail dialog via the send to mail shell context menu. I heard a long time ago that in some cases Outlook opens in a mode where no addins are loaded. However, even if Outlook is already running (in which case my addin is already loaded), my addin toolbar does not appear. I ran through it with a debugger, and none of my code is hit for this particular inspector. What if I use Extended MAPI to do this? Since it happens for both Simple MAPI and the shell send to mail context menu, I'm assuming that it won't work for Extended MAPI either. Is there something else I can do about this or is it just a limitation of Outlook? Thanks Mark Smith |
#3
|
|||
|
|||
![]()
Thanks for the reply Ken.
I finally got back to this issue, and I've got a few more questions. As far as finding the new inspector without the NewInspector event firing, are you suggesting doing something like a timer based polling? Or is there some other event to trap? I didn't see anything that looked like it would work. Maybe I'm looking in the wrong place... You also say that for the case where Outlook isn't already running the addin should load. I rechecked my code and the addin does get loaded. However I tried checking the inspector collection in the OnStartupComplete event, which is the last one that I get other than the ones for the inspectors or toolbars themselves. The inspector collection is still empty at this point. So again, is there some other later event to trap, or am I stuck with a polling solution here also? Thanks, Mark Smith "Ken Slovak - [MVP - Outlook]" wrote: When a Simple MAPI message is opened by Outlook any addins will run if Outlook is running already, and if the addin is correctly written it will run even if Outlook wasn't previously running. It all depends on how the addin is written and what it does when OnConnection is fired. A new Inspector opened from a Simple MAPI message is added to the Inspectors collection, but it doesn't fire the Inspectors.NewInspector() event. Since that's how most code will discover an Inspector was opened the code won't know about the new Inspector, unless you scan the Inspectors collection and account for any open Inspectors that aren't already being handled. Using Extended MAPI won't help with this, the limitations would be the same. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Mark Smith" wrote in message ... I've got a COM addin that adds a toolbar to Outlook inspectors. In another process I call the Simple MAPI MAPISendMail function. When the new e-mail dialog pops up, my addin toolbar does not appear. I figured out that the same behavior happens if I open up a new send e-mail dialog via the send to mail shell context menu. I heard a long time ago that in some cases Outlook opens in a mode where no addins are loaded. However, even if Outlook is already running (in which case my addin is already loaded), my addin toolbar does not appear. I ran through it with a debugger, and none of my code is hit for this particular inspector. What if I use Extended MAPI to do this? Since it happens for both Simple MAPI and the shell send to mail context menu, I'm assuming that it won't work for Extended MAPI either. Is there something else I can do about this or is it just a limitation of Outlook? Thanks Mark Smith |
#4
|
|||
|
|||
![]()
Polling is the answer to both questions.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Mark Smith" wrote in message ... Thanks for the reply Ken. I finally got back to this issue, and I've got a few more questions. As far as finding the new inspector without the NewInspector event firing, are you suggesting doing something like a timer based polling? Or is there some other event to trap? I didn't see anything that looked like it would work. Maybe I'm looking in the wrong place... You also say that for the case where Outlook isn't already running the addin should load. I rechecked my code and the addin does get loaded. However I tried checking the inspector collection in the OnStartupComplete event, which is the last one that I get other than the ones for the inspectors or toolbars themselves. The inspector collection is still empty at this point. So again, is there some other later event to trap, or am I stuck with a polling solution here also? Thanks, Mark Smith |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Faxing problem via Simple Mapi in Server2003/Exchange environment | Jimmy Hoffa | Outlook - Fax Functions | 2 | October 30th 08 10:15 PM |
Is there a simple way to send my contact listing to another user? | looking for a shortcut | Outlook - Using Contacts | 2 | October 15th 08 04:10 AM |
Outlook COM Addin and MAPI Provider | Windoze | Add-ins for Outlook | 1 | January 14th 08 06:45 PM |
Outlook security block & Simple Mapi | Jacob Havkrog | Outlook and VBA | 2 | March 14th 07 05:58 PM |
Out Look Express & Simple MAPI , Outlook ExMAPI example | Robert Palmer | Add-ins for Outlook | 1 | April 18th 06 03:35 PM |