开发者

Outlook plugin not loading after clicking mailto links

开发者 https://www.devze.com 2022-12-20 00:26 出处:网络
I\'ve created an Outlook 2007 AddIn that among other things has to perform someactions when user creates a new email. I\'ve hooked to proper events and everything works correctly in all but o开发者_如

I've created an Outlook 2007 AddIn that among other things has to perform some actions when user creates a new email. I've hooked to proper events and everything works correctly in all but o开发者_如何学Pythonne case.

The problem is that if Outlook is not running and user clicks mailto URL then Outlook opens only one explorer where user can compose the email. The other parts of the app are not loaded at that time. The problem is that in this case my plugin is not loading so I cannot add my custom code there.

I'd like to know if there's a way to overcome this problem.

I see two possible solutions but I don't know if they are possible.

  • Make plugin load on mailto links (one explorer mode). I suspected this would be provided out-of-the-box by VSTO but it's not. I couldn't find anything about that on MSDN nor MS Outlook Programming book.
  • Change mailto URL handler on client machine to launch full Outlook (like you would click Outlook shortcut) instead of just one Explorer. This would load my plugin before opening email explorer and would probably work as I intended.

Does anyone knows if any of that solutions is possible? Or maybe you have another that might work.


I had the same problem too but with Outlook 2003. The reason for this behaviour is security. Imagine a user installs an evil addin by mistake, which answers to mailto links and therefore does some evil stuff...

In my case I have developed a workaround. Instead of using the mailto links, I have created an own link (it's a simple shell extension which can easily be created look here) which starts a little helper application. This helper applications starts Outlook in full mode ( Outlook.exe /recycle) after having a little check for the load behaviour value (must be set to "3").

This way you can start Outlook in fullmode in order to use your addin ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消