Ty Anderson

Video: Create advanced form regions for Outlook 2013, 2010, 2007 (C#, VB.NET)

A few weeks ago I did a short video to introduce our new product known as Add-in Express Regions for Microsoft Outlook and VSTO (you can watch it here: Introducing Add-in Express Regions for Outlook and VSTO).

I thought it time to take things up a notch and provide a solid sample that implements advanced form regions in a VSTO project and also accesses the Outlook object model in a meaningful way. Add-in Express Regions work with all versions of Outlook 2013, 2010, 2007 and 2003.

This video shows how to use Regions for Outlook and VSTO to create tasks from an email and then save them to a specified tasks folder using C# or VB.NET. It's pretty slick if you ask me…

This video was captured in Visual Studio 2010 with Add-in Express Regions for Microsoft Outlook and VSTO .

You may also be interested in:

When to release COM objects in Office add-ins developed in .NET

4 Comments

  • Nico says:

    Ty,

    First of all, thank you for all great video’s and blog posts.
    I just had a question about this video at 19:50. Is it needed to release com object ‘Folder’? It is passed by reference in procedures fldrs_FolderAdd and fldrs_FolderChange. Maybe it was your intention to release fldrType?

    I’m not always using .Net (I still do a lot of VBA development) but with addinexpress trying to find my way in the managed world and doing it in the right way ;o)

    Again, thank you for the great walkthroughs in detail!

    Best regards,
    Nico

  • Ty Anderson says:

    Hi Nico –

    You are correct. The reason I don’t release fldrType is because I don’t actually store a COM object there. I just check the item type of the folder object which is a COM Object. When I done, I release the folder object. You are right to focus on proper release of COM objects. Andrei wrote the definitive post on regarding when to release COM Objects when developing with .NET.

    Thank you for your kind comments regarding the videos! We’ll keep producing them if you keep watching them.

    Ty

  • priyanka says:

    Can we pass com objects as reference parameters.

    Will it cause Item leak.

  • Andrei Smolin (Add-in Express Team) says:

    Hello priynka,

    You can pass a COM object as a parameter. This doesn’t increment the reference counter. Still, you need to determine who – the caller or the callee – is reponsible for releasing the COM object.

    You may want to read my blog about Releasing COM objects in Office add-ins.

Post a comment

Have any questions? Ask us right now!