On 6/28/2006 12:56 PM, "Barry Wainwright" <[EMAIL PROTECTED]> wrote:

> You are on the right lines.
> 
> If you examine the applescript dictionary of Entourage, you will get the
> clues you need.
> 
> "address of (recipients of theMessage whose recipient type is to recipient)"
> is exactly the right place to start. Looking at the dictionary entry for a
> message, you can see that it has an element called "recipient". This is what
> you get with your line above. The class definition (again, in the
> dictionary) for a recipient shows it has two properties: Address and
> Recipient type. You used 'recipient type' to get the list of addresses of
> the 'to recipients'.
> 
> Now, when your script line gets the 'address of recipient' what it gets is
> defined (in the recipient dictionary entry) as a data type of class
> 'address'. Dig a bit deeper in the dictionary and you see that, in turn, a
> data class of address contains two more properties: 'address' and 'display
> name'. The first of these is defined as a string, the latter as Unicode
> Text.
> 
> So, what contains the actual email address is:
> 
> Address of address of (recipients of theMessage whose recipient type is to
> recipient)
> 
> Now, put it all together....
> 
> If you want both the display name and the email address of the recipients,
> do it with this:
> 
> tell application "Microsoft Entourage"
>     set theMessage to item 1 of (get current messages)
>     set {whoto, theName} to {address, display name} of address of ¬
>         (recipients of theMessage whose recipient type is to recipient)
> end tell
> 
> This will give you two lists: theName contains a list of the display names
> of all the to recipients, whoto contains a list of all the email addresses.

Wow Barry - Thank you so much for this incredibly detailed - educational
explanation!!!

It worked perfectly and I learned so much!

BTW:  I have been wanting this small additional feature for a long time - so
thanks again!

--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]



--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to