Outlook 2011 - Accessing/Removing Recipients
Outlook 2011 - Accessing/Removing Recipients
- Subject: Outlook 2011 - Accessing/Removing Recipients
- From: Dave <email@hidden>
- Date: Thu, 30 Apr 2015 17:01:32 +0100
Hi,
Finally got it to work with this:
on run
tell application id "com.microsoft.Outlook"
activate
set myEmailAddressList to {}
set myMessageList to current messages
set myMessage to item 1 of myMessageList
repeat with myRecipient in recipients of myMessage
set myEmailAddress to email address of myRecipient
set myEmailAddressString to address of myEmailAddress as string
copy myEmailAddressString to end of myEmailAddressList
end repeat
set myRecipientCount to the number of items in myEmailAddressList
repeat with myIndex from 1 to myRecipientCount
set myEmailAddressString to item myIndex of myEmailAddressList
if myEmailAddressString starts with "email@hidden" then
beep
delete recipient myIndex of myMessage
end if
end repeat
return "OK"
end tell
end run
It’s as ugly as a very ugly thing, but that’s AppleScript for you!
All the Best
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden