Re: Entourage: Move Work Address to Home Address
Re: Entourage: Move Work Address to Home Address
- Subject: Re: Entourage: Move Work Address to Home Address
- From: Keith Russo <email@hidden>
- Date: Tue, 24 Dec 2002 13:29:42 -0800
Paul Berkowitz at email@hidden wrote:
[snip]
>
Have you noticed the {list brackets}?
>
>
Selection is a list. You can't get business address of a list. You need to
>
get item 1 of selection, or iterate through each item of selection. I think
>
you want this:
>
>
tell application "Microsoft Entourage"
>
set theItems to selection
>
repeat with theItem in the theItems
>
if class of theItem is contact then
>
set StartAddress to the home address of theItem
>
set DestinationAddress to the business address of theItem
>
set the home address of theItem to DestinationAddress
>
set the business address of theItem to StartAddress
>
end if
>
end repeat
>
end tell
>
>
That swaps Home and Work addresses; if home is currently blank and business
>
filled, you'll get the reverse. You won't lose any data if you made an
>
error, and if you selected a group by mistake it will just get omitted
>
rather than breaking the script.
>
>
A script something like this (but with an error, at least in X) was
>
distributed by MS with Entourage 2001. This is based on it.
Any suggestion on dealing with "default postal address"?
Thank you for the solution Santa :)
Keith Russo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.