Outlook addin with redemption dll and safemailitem

P

preks

Hi All,

I am developing Outlook addin in visual basic 6.0 and i am using
redemption dll, The basic functionality i am developing is that, I want to
scan all incoming mails and currently I am able to trace all the incoming
mails also. I am saving all the incoming mails in the xml files with some
basic properties, which will hold following properties as nodes in the xml
file. They are From, to , cc, bcc, subject, body, attachment file names.
All the functionality is written and addin is working fine.

However while accessing SafeMailItem.Sender.Address field to get sender
email id. My Outlook keeps running, though outlook executable is closed.

I have checked that after commenting out code, outlook gets closed properly.

Can any one help me out.

Regards
Preks
 
D

Dmitry Streblechenko

Check if the Sender property returned is not Nothing before accessing
Sender.Address. You can work around the problem by accessing
PR_SENDER_EMAIL_ADDRESS directly using Fields:

PR_SENDER_EMAIL_ADDRESS = &H0065001E
MsgBox MailItem.Fields(PR_SENDER_EMAIL_ADDRESS).

Or you can try the latest version (3.3, released this weekend) - it handles
IMO mode (that's what you are probably using) much better.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top