Outlook Recipient (how to determine?)
Has anyone ever figured out a simple way to find out who the MAIN recipient is in Outlook?
I've done a lot of searching and from what I can tell there is no easy way. What Outlook gives you instead is a Recipient list that you have to iterate through and then I don't know what. It was too convoluted and messy for me to dive deeper into it. In the end I'm not even sure it was possible to figure out anything more than a list of the CC's and everyone else who got the e-mail.
Did I miss something or is it really that difficult? This is something I've wanted to put in my software for a long time and haven't been able to figure out.
Thanks. :)
Re: Outlook Recipient (how to determine?)
I've never heard of the term "main recipient".
In mail you have 3 possible places for recipients: to:, cc: and bcc:
But they are all 3 just basic lists of email addresses.
Re: Outlook Recipient (how to determine?)
Quote:
Originally Posted by
cafeenman
What Outlook gives you instead is a Recipient list that you have to iterate through
Yes, because the "main" recipients may be several addresses and not only one.
When you write an email in the field "To:" you can write as many addresses as you want (separated by ';'), did you see that?
Re: Outlook Recipient (how to determine?)
try this
Dim objOutlook As Object
Dim nI As Long
Dim pColValue As New Collection
Dim pColID As New Collection
2 Set objOutlook = CreateObject("Outlook.Application")
3 On Error Resume Next
4 For nI = 1 To objOutlook.session.Accounts.Count
5 pColValue.Add objOutlook.session.Accounts.Item(nI), objOutlook.session.Accounts.Item(nI)
6 pColID.Add objOutlook.session.Accounts.Item(nI), objOutlook.session.Accounts.Item(nI)
7 Next
8 On Error GoTo ERROR_Outlook_ChooseMailbox
Re: Outlook Recipient (how to determine?)
Thank you. I will try that.
Out of curiosity, what does the 'p' in the prefix stand for or signify?
Re: Outlook Recipient (how to determine?)
Quote:
Originally Posted by
Eduardo-
Yes, because the "main" recipients may be several addresses and not only one.
When you write an email in the field "To:" you can write as many addresses as you want (separated by ';'), did you see that?
In my case, emails I receive I'm the only recipient but my company has multiple email addresses and I want to show in the communication form which address received it.
Re: Outlook Recipient (how to determine?)
Re: Outlook Recipient (how to determine?)
Quote:
Originally Posted by
cafeenman
In my case, emails I receive I'm the only recipient but my company has multiple email addresses and I want to show in the communication form which address received it.
Then the list will contain only one item..
Re: Outlook Recipient (how to determine?)
OK. Again, thank you. I will try it and see how it goes. Hopefully it's that simple. :)