What is the difference between a COM Add in and a VSTO Add in

Mohit picture Mohit · Jan 26, 2012 · Viewed 9.4k times · Source

I am trying to develop an addin for outlook, and I found a provider http://www.add-in-express.com. But, they have 2 offerings in one(http://www.add-in-express.com/add-in-net/index.php) they allow to create COM add in Using VS 2010 and .Net Framework 4.0 (How is that possible, I always thought COM can only be create in VB6, else You have to create a COM callable Wrapper (CCW)).

The other offering is VSTO Tools (http://www.add-in-express.com/add-in-vsto/index.php), Which is also using .Net Framework 4.0 and this is totally confusing.

Please help me understand.

Regards Mohit Thakral

Answer

SliverNinja - MSFT picture SliverNinja - MSFT · Jan 26, 2012

VSTO uses COM wrappers (RCW) to communicate with Office via a managed API. Unfortunately - the only known way to communicate directly with Office products is by using COM components because that is the technology Office is built upon. Even when using VSTO, you still have to be aware of the COM-objects lifetime - they don't encapsulate it for you (you still have to call Marshal.ReleaseCOMOjbect).

A great resource for learning about VSTO in-depth is VSTO 2007 book by Addison-Wesley. If you go the VSTO route - you should also pickup the VSTO Extension Library (VSTO_PTExtLibs.exe) which eases the pain of COM parameter limitations using extension methods.

I have not personally found a need to use AddIn-Express, but you may find it helps you if you don't want to invest the time in learning the VSTO framework. This choice also depends on the complexity of the solution and the time and resources you have available.