.NET + REDEMPTION + OUTLOOK

  • Thread starter Thread starter Anushya
  • Start date Start date
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
 
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.
 
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.
 
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.

FYI, most of the other newsgroups you cross-posted to are not relevant to
your post - it is a strict VBA question and belongs in this group only.
 
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
 
Back
Top