• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Outlook 2011 - Accessing/Removing Recipients
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: access violation in OS X 10.10.3
  • Next by Date: Re: Outlook 2011 - Accessing/Removing Recipients
  • Previous by thread: Outlook 2011 - Accessing/Removing Recipients
  • Next by thread: access violation in OS X 10.10.3
  • Index(es):
    • Date
    • Thread