Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Easiest way to see if the recipients are Exchange users?

Geek News

Easiest way to see if the recipients are Exchange users?
david.ing[ at ]gmail.com 3/18/2006 5:48:26 PM
Hi,

I have an open Inspector window and a new mail being written. Once the
Send is hit I can subscribe to the App.ItemSend event and examine the
message.

What I need to be able to do is tell if any of the recipients on the
To/CC/ fields are Exchange users or not.

Example:

User Bob has an exchange account, and is using Outlook. He sends a
single email to Alice and Frank. Alice is on the same exchange server
as Bob, while Franks in on something else, say gmail.

I want to be able to distinguish that this message in Outlook has at
least one non-Exchange user as the destination.

Is this possible? I'm guessing some sort of CDO call for the
Recipients, plus maybe the Address Type from EMAPI property, but you
guys are smarter than me and may already know the best way. :-)

Thanks!

Re: Easiest way to see if the recipients are Exchange users?
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 3/18/2006 6:12:59 PM
Iterate the Recipients collection and check each Recipient.AddressEntry.Type. If it's "EX," it's an Exchange recipient.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

<david.ing[ at ]gmail.com> wrote in message news:1142704106.122400.226070[ at ]g10g2000cwb.googlegroups.com...
[Quoted Text]
> Hi,
>
> I have an open Inspector window and a new mail being written. Once the
> Send is hit I can subscribe to the App.ItemSend event and examine the
> message.
>
> What I need to be able to do is tell if any of the recipients on the
> To/CC/ fields are Exchange users or not.
>
> Example:
>
> User Bob has an exchange account, and is using Outlook. He sends a
> single email to Alice and Frank. Alice is on the same exchange server
> as Bob, while Franks in on something else, say gmail.
>
> I want to be able to distinguish that this message in Outlook has at
> least one non-Exchange user as the destination.
>
> Is this possible? I'm guessing some sort of CDO call for the
> Recipients, plus maybe the Address Type from EMAPI property, but you
> guys are smarter than me and may already know the best way. :-)
>
> Thanks!
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net