.NET + REDEMPTION + OUTLOOK

A

Anushya

Hi All

developing an addin using redemption in .net. Can anybody say how to
find whether the mail item i am accessing is sent item or inbox mail
item.

The mail items can be in anyfolder(pls dont ask me to check for the
folder name).

Thanks
Anushya
 
E

Eric Legault [MVP - Outlook]

But won't the folder name be the perfect way for you to determine which
folder contains the message? If you call objMessage.Parent.Name, that gives
you direct access to the parent folder.

Or, you can declare two MAPIFolder object variables beforehand, and set each
of them to NameSpace.GetDefaultFolder(parameter) using olFolderInbox and
olFolderSentItems as the parameters. Then compare their EntryID property
values with that of the parent folder of the current e-mail message; the one
that matches tells you which folder is holding the message.
 
E

Eric Legault [MVP - Outlook]

But won't the folder name be the perfect way for you to determine which
folder contains the message? If you call objMessage.Parent.Name, that gives
you direct access to the parent folder.

Or, you can declare two MAPIFolder object variables beforehand, and set each
of them to NameSpace.GetDefaultFolder(parameter) using olFolderInbox and
olFolderSentItems as the parameters. Then compare their EntryID property
values with that of the parent folder of the current e-mail message; the one
that matches tells you which folder is holding the message.
 
D

Dmitry Streblechenko \(MVP\)

Check if PR_RECEIVED_BY_xxx and PR_RCVD_REPRESENTING_xxx properties are
present. If they are, that's a message that you have received, if not,
that's a message you sent.

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