![]() |
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 |
#2
|
|||
|
|||
![]()
What exactly does not work?
Are you trying to retrieve the SMTP address of an EX user when the AD hosting that user detaisl is not available? You cannot do that: the primary SMTP address is stored in the AD, so it needs to be accessible, there is no way around that. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Leanne" wrote in message ... With the help of Sue's drag and drop sample code, I was able to get dragging and dropping email to a form working in vb.net. The problem I am having is getting the exchange recipient email address for another mailbox. I have the code working to get the exchange users email addresses but it's failing when a recipient is another mailbox. Here's the code I'm using. Thanks for any assistance Dim recipients As Outlook.Recipients = mail.Recipients If recipients IsNot Nothing Then Try For i As Integer = 1 To recipients.Count Dim recipient As Outlook.Recipient = recipients.Item(i) If recipient IsNot Nothing Then If recipient.Type = CInt(recipientType) Then Dim entry As Outlook.AddressEntry = recipient.AddressEntry() If entry IsNot Nothing Then Try If entry.Type.ToString.ToUpper = "EX" Then If entry.getexchangeuser Is Nothing Then listBoxItems.Add(recipient.Name & ") 'WORKS WITH THIS LINE BUT IS THERE A BETTER WAY???? Else listBoxItems.Add(entry.getexchangeuser.primarysmtp address()) End If Else listBoxItems.Add(entry.Address) End If End If End If End If Next End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reading SMTP address from Exchange Sender mail address | VebKol | Outlook and VBA | 4 | March 6th 09 04:08 PM |
Outlook address books reading (C++). | Sergeichik | Add-ins for Outlook | 1 | December 5th 08 04:48 PM |
Reading windows user's email address | John[_11_] | Outlook - General Queries | 5 | June 2nd 08 05:47 PM |
Reading windows user's email address | John[_11_] | Outlook and VBA | 5 | June 2nd 08 05:47 PM |
How to add the contact in the additional mailbox show in address b | Tony | Outlook - Using Contacts | 1 | March 10th 06 06:05 PM |