> On 8/4/02 10:25 pm, "Allen Watson" wrote:
>
>> One of us could probably whip up a script that would grab the E-mail address
>> for an incoming message, check the Address Book to see if it is listed there
>> with a display name,
>
>
> set theName to display name of item 1 of (find (get address of sender of item
> 1 of (get current messages)))
To expand on that a little, and make it into a useable script:
-- Update sender from address book
-- a script by Barry Wainwright <[EMAIL PROTECTED]>
-- In response to a request on the Entourage:Mac mailing list
-- 9th April 2002
tell application "Microsoft Entourage"
try
set theMess to item 1 of (get current messages)
on error
beep
return -99
end try
set theSender to sender of theMess
set theContacts to find (address of theSender)
if (count theContacts) > 0 then
set theContact to item 1 of theContacts
set theName to display name of theContact
set the display name of theSender to theName
set the sender of theMess to theSender
end if
end tell
Barry Wainwright
<http://www.barryw.net>
Outside of a dog, a book is man's best friend.
Inside of a dog, it's too dark to read. -- G. Marx
