You are here: Office-Outlook.com  / Outlook Forum

Retrieving custom headers from an Outlook (2003) MailItem

Home » Outlook addins and plugins development » Microsoft Office add-ins
Retrieving custom headers from an Outlook (2003) MailItem [message #469275] Wed, 14 January 2009 14:57 Go to next message
Andrew[1]
Messages: 112
Registered: June 2006
Senior Member
Environment: Visual Studio 2008
Language: VB.Net
Application: Outlook 2003

I seem to have come to a road block. I'm writing an application that needs
to get the header from an email in Outlook 2003. This needs to check every
existing mail that's opened.

One of the ways I found that could get the header was to use the CDO libary,
however, I also found that Microsoft doesn't officially support its usage
with managed .net code because of memory leaks. The work around was to create
a separate exe for the CDO functionality.I'm not sure how efficient that
would be since it needs to run everytime an email is opened.

Is my fear of it being extremely inefficient warranted? If so, is there a
plausible work around?

Thanks,
Re: Retrieving custom headers from an Outlook (2003) MailItem [message #469327] Wed, 14 January 2009 19:28 Go to previous message
Andrew[1]
Messages: 112
Registered: June 2006
Senior Member
Thanks a lot Ken, I figured as much that was the case.

"Ken Slovak - [MVP - Outlook]" wrote:

> Extremely inefficient, and also a source of memory leaks. You're logging
> into and off of CDO.Session objects on each call?
>
> For managed code and Outlook 2003 your options are limited. You can do what
> you're doing now or you can use Redemption (www.dimastr.com/redemption) or
> another API that works with managed code.
>
> --
> 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
>
>
> "Andrew" <Andrew@discussions.microsoft.com> wrote in message
> news:0B2874C7-5021-447B-8DB2-833578029046@microsoft.com...
> > Environment: Visual Studio 2008
> > Language: VB.Net
> > Application: Outlook 2003
> >
> > I seem to have come to a road block. I'm writing an application that needs
> > to get the header from an email in Outlook 2003. This needs to check every
> > existing mail that's opened.
> >
> > One of the ways I found that could get the header was to use the CDO
> > libary,
> > however, I also found that Microsoft doesn't officially support its usage
> > with managed .net code because of memory leaks. The work around was to
> > create
> > a separate exe for the CDO functionality.I'm not sure how efficient that
> > would be since it needs to run everytime an email is opened.
> >
> > Is my fear of it being extremely inefficient warranted? If so, is there a
> > plausible work around?
> >
> > Thanks,
>
>
Previous Topic:The sender problems, help me pls?
Goto Forum: