As a VS Developer I'm excited about VSTO 2005 and I'm also frustrated by the lack of documentation and fragmentation in existing documentation for VSTO as compared to VS but...
I need to be able to have Outlook interact with an external application on the same machine by having Outlook send copies of email and contact objects or data to the external application and accept data from the external application for email to be sent by Outlook. I've downloaded the Outlook Hands-on Labs to glean what I can with the following results:
The Outlook Inspectors seem unpredictable when trying to add a menu item for sending the Mail or Contact CurrentItem to my external application. Depending on different approaches I've tried, as I open and close different email and contact items, I get none, one or many duplicate menu items and can only trap the click event of the last menu Control Button created as there has to be a ThisApplication reference to it. And currently I can't seem to inspect the Inspector.CommandBars.ActiveMenuBar on the NewInspector event to see if it already has my custom menu item added. It's a little confusing that, according to the Outlook VBA documentation, CommandBars is a property of the Explorer and Inspector object and not an object itself but I guess now I'm just complaining.
Is there just one Mail Inspector and just one Contact Inspector such that if I add my custom menu to the first one created, all subsequent reused or new instances of those inspectors will also have my custom menu on it And, as long as I'm making this post, does anyone have any insight into the possibility of, or problems with, my Outlook Addin instantiating a remote singleton object so that Outlook and my external application can talk to each other
The good news is it looks like there are some books for VSTO 2005, the bad news is they're not available yet.
Did I say I was excited about VSTO 2005
MT

Outlook Addin to Interact With External Application
Tim Haynes
MT,
Handling objects for callbacks is an area commonly targeted wtih Outlook add-ins. As you noted, putting your object refs in the thisapplication file is your best bet for keeping them from being swept by the GC at the wrong time. If you look at my article that uses menus in an Outlook add-in with VSTO, you will see how I set up the menu and handle the events. I have no problems with objects going dead thus causing click events to be disconnected. Also, handling the menu in the way I demonstrate will help you not have duplicates.
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnofftalk/html/office06012005_VSTOOutlookAdd-in.asp frame=true
Let me know if you need more help!
John.
RWeigelt
Hi
There are several publications now for VSTO 2005, the most current i believe from Amazon sorry but easiest site that is more global to search http://www.amazon.com/gp/product/0321334884/qid=1137451346/sr=8-1/ref=pd_bbs_1/103-5052357-8135867 n=507846&s=books&v=glance this is done by two of the developers of VSTO and is a very informative and ideal read for this type of scenario.
You need to think of using a collection to store the inspectors you are working on and as such not quite sure how you are working this solution but this book will help. Another book was done before release but has some articles that may also help http://www.amazon.com/gp/product/0735621322/qid=1137451447/sr=1-1/ref=sr_1_1/103-5052357-8135867 s=books&v=glance&n=283155 which is by Andrew Whitechapel a program manager in the VSTO Team.
Regards