Reading another mailbox Address

Status
Not open for further replies.
L

Leanne

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 & "@somewhere.com") 'WORKS WITH THIS LINE

BUT IS THERE A BETTER WAY????

Else

listBoxItems.Add(entry.getexchangeuser.primarysmtpaddress())

End If

Else

listBoxItems.Add(entry.Address)

End If

End If

End If

End If

Next

End If
 
D

Dmitry Streblechenko

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)
 
S

srikannan

i think thats not possible to proceed... Anyway Thank you for the best

information from you. I want to share this to you... About the domain

name and hosting services.. Then i got my domain name as an

international one with free hosting services from this site

'TuckTail.com : Search, Register and Transfer Web Domain Names and More'

(http://www.tucktail.com/) got @ lowest costs only.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
W Outlook 2010 Reading Pane Slows Startup Using Outlook 3
C Custom Form (seperate layout pages and message reading pane) Outlook VBA and Custom Forms 0
C Reading Pane for Custom Form Outlook VBA and Custom Forms 2
llama_thumper Composingemails in reading pane Using Outlook 1
O Reading Pane safety Using Outlook 0
P Reading Pane (Reading Pain?) Default Setting Using Outlook 1
U Outbox Message Stuck after reading some MailItem Properties with VBA Outlook VBA and Custom Forms 1
M Outlook 2016 bottom reading pane has disappeared Using Outlook 2
M Outlook 2016: Changing default font for Notes and Reading Pane Using Outlook 4
Rupert Dragwater "there was an error reading this theme" Using Outlook 3
R Toggle the Reading Pane using Keyboard Shortcut Using Outlook 0
T Format Reading Pane Outlook VBA and Custom Forms 5
B Auto Preview Attachment in Inspector Reading Pane Outlook VBA and Custom Forms 1
D Calendar view problems with reading pane open Using Outlook 0
E Reading Pane has disappeared Using Outlook 1
R Outlook 2010 - Reading Pane and To Do Bar Settings Not Saved on Exit Using Outlook 2
Diane Poremsky Excel Files Won't Display in Reading Pane New Slipstick.com Articles 1
S How can I Customize Message Header in both Reading Pane and Open Message Design? Using Outlook 1
M Outlook 2007: how to narrow the reading pane and the composing pane Using Outlook 0
P Custom Forms in Reading/Viewing Pane Using Outlook 1
L Reading Pane - COMPLETELY DISABLE? Using Outlook 10
T Outgoing Messages in the Reading Pane Cannot Be Flagged in Outlook 2013 Using Outlook 6
F Outlook 2007 - Reading Pane Automatically Downloads First/Topmost Message Using Outlook 4
B Outlook 2010 won't save 'current view' with reading pane at 'bottom' Using Outlook 4
F Outlook 2010, reading pane, global settting for fields? Using Outlook 1
V Reading/Posting in Newsgroups Using Outlook 1
C Contact photos not showing in reading pane in Outlook 2013 Using Outlook 3
T Killing reading pane - "globally" Using Outlook 11
L Show all images for jpg attachments in reading pane for received emails? Using Outlook 3
A Received Date None after reading Using Outlook 2
M Viewing Custom Form Fields in the Reading Pane and in Replies Using Outlook 3
B Reading CompressedRichText field in SQL database BCM (Business Contact Manager) 1
R Proof Of Looping Bug in Reading Outlook Inbox From Access? Outlook VBA and Custom Forms 2
S Macro for Viewing mails one after the other in the Reading Pane Outlook VBA and Custom Forms 2
E CustomTaskPane in PLace of Reading Pane Outlook VBA and Custom Forms 3
E CustomTaskPane in PLace of Reading Pane Outlook VBA and Custom Forms 3
N Reading Recipients in a folder Outlook VBA and Custom Forms 1
J Reading outlook conatcts Outlook VBA and Custom Forms 1
D Getting Started - Reading attachment Outlook VBA and Custom Forms 4
J Reading E-Mails in VBA Outlook VBA and Custom Forms 1
P Spacebar when reading email Outlook Wishlist 2
T Blank Email in Reading Pane for Custom Form Outlook VBA and Custom Forms 12
S Reading mailitem after mail is send give runtime error. Outlook VBA and Custom Forms 1
C Getting reading pane horizontal instead of vertical Using Outlook 2
Y View Reading Pane for Drafts folder Using Outlook 2
R Time for another article on contact cards? Using Outlook 0
C Copy Outlook contact field value to another field Outlook VBA and Custom Forms 1
J Message search and edit, another way? Outlook VBA and Custom Forms 4
F Copy and replace not update contact in another pst Using Outlook 0
D Importing Outlook Categories from another domain (Exchange 2016/Outlook 2016) Using Outlook 4

Similar threads

Top