![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi All,
I have tried access sender's email and receiver's email. I have found a code to get sender's email.I have used Redemption.safermailitem, which works cool. But i have trouble in getting the receiver email address. I have tried the following items (sample code got it from internet) Dim utils, MailItem, PrSMTPAddress, SMTPAddress utils = CreateObject("Redemption.MAPIUtils") PrSMTPAddress = &H39FE001E 'Get SMT P address of the first recipient. It is assumed that the recipient is an Exchange Server user. SMTPAddress = utils.HrGetOneProp(oMailItem.Recipients(1).Address Entry.MAPIOBJECT, PrSMTPAddress) LogMessage("Receiver Address" + SMTPAddress) But i am getting the following error at the place of HrGetOneProp - System.Runtime.InteropServices.COMException (0xA5120009): Property is read-only. at Outlook.AddressEntry.set_MAPIOBJECT(Object MAPIOBJECT) at DIAMSXe_OutlookAddIn.XMailItem.btnAttachToDIAMSXe_ Click(CommandBarButton ctrl, Boolean& cancel) at Outlook.AddressEntry.set_MAPIOBJECT(Object MAPIOBJECT) at DIAMSXe_OutlookAddIn.XMailItem.btnAttachToDIAMSXe_ Click(CommandBarButton ctrl, Boolean& cancel)Property is read-only. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Issue number 2: Dim utils1, MailItem1, PrSenderEmailAddress, SenderEMail utils1 = CreateObject("Redemption.MAPIUtils") PrSenderEmailAddress = &HC1F001E SenderEMail = utils1.HrGetOneProp(oMailItem.MAPIOBJECT, PrSenderEmailAddress) LogMessage("Sender Address" + SenderEMail) When i used this for sender's email, i was getting "/O=COMPANYDOMAIN/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/ CN=RECEIVERNAME.. " Is this going to be the same for receiver email too? Actually, i am looking for Email id. Can some one help me here. |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SMTP address of Exchange recipient | Bill | Outlook and VBA | 5 | August 8th 07 08:44 PM |
How to retrieve an email address from an appointment recipient? | Marcus | Outlook - Using Forms | 1 | April 4th 07 02:56 PM |
Recipient.Address in Exchange Server | Joel | Outlook and VBA | 3 | December 8th 06 05:52 AM |
Color Subject by Recipient Address | JoeCL | Outlook - Installation | 0 | November 3rd 06 08:41 PM |
Help! outlook keeps deleting recipient email address... | networm | Outlook - General Queries | 2 | March 8th 06 09:05 AM |