How to get the 'TO' address from a current mesage using CDOSession.getmsg - TechRepublic
Question
December 16, 2008 at 01:28 AM
tj

How to get the ‘TO’ address from a current mesage using CDOSession.getmsg

by tj . Updated 17 years, 7 months ago

Hi All!

Quick question, I’m hoping I’m being blind. We’re currently running a script on our outlook that generates tasks etc for certain mails coming in. We need to add criteria to ignore a certain address though.

Currently the sender address works:
Set CDOSession = EventDetails.Session
Set CurItem = CDOSession.GetMessage(EventDetails.MessageID,Null)

‘*** Determine who message is from
Set objSender = CurItem.Sender
strSenderName = objSender.Name
strSenderAddress = objSender.Address

What I need to do is create something like this:

Set ObjTo = CurItem.Recipient
StrSenderTo = ObjTo.Address

However I can’t find the tag to get the ‘To’ address.

Any ideas?

TJ

This discussion is locked

All Comments