Re: Outlook 2011 - Accessing/Removing Recipients
Re: Outlook 2011 - Accessing/Removing Recipients
- Subject: Re: Outlook 2011 - Accessing/Removing Recipients
- From: Axel Luttgens <email@hidden>
- Date: Thu, 30 Apr 2015 18:04:52 +0200
> Le 30 avr. 2015 à 17:06, Dave a écrit :
>
> Hi All,
>
> I’m trying to remove a recipient from an Outlook Email, using the Script below which doesn’t work.
>
> Could someone tell me what I am doing wrong? It doesn’t even detect “email@hidden” in the “if” statement, even though the log shows it as being there?
Hello Dave,
Yes, that’s often a bit surprising… ;-)
> […]
> repeat with myEmailAddress in myEmailAddressList
> log "myEmailAddress: " & myEmailAddress
> if myEmailAddress is equal to "email@hidden" then
Here, on each iteration, myEmailAddress is a reference (i.e "item X of myEmailAddressList"); see:
https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_control_statements.html#//apple_ref/doc/uid/TP40000983-CH6g-128481
Strictly speaking, its value is not of class text.
On the other hand, the equality operator takes the classes of its operands into account:
https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_operators.html#//apple_ref/doc/uid/TP40000983-CH5g-124095
As a result, this one should be fine:
if contents of myEmailAddress is equal to "email@hidden" then
_______________________________________________
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