Re: Home/Work Addresses Reversed

From: Paul Berkowitz (berkowit_at_spoof_silcom.com)
Date: 02/18/04


Date: Tue, 17 Feb 2004 22:56:29 -0800

On 2/17/04 11:54 AM, in article BC57B189.50F8%dc@dev.null, "Dave Cortright"
<dc@dev.null> wrote:

> On 2/16/04 4:31:01 PM, in article
> f8db67e9.0402161631.743df0a6@posting.google.com, "Lee" <lee718@hotmail.com>
> wrote:
>
>> My addresses in Entourage for individual contacts that were "Work"
>> addressses for some reason are now all over on the "Home" side. Not
>> sure how that happened....must have been when I was having trouble
>> with my Palm syncing. Anyway is there an easy "bulk" way to get them
>> out of the "Home" tab and back under the "Work" tab? Thanks Lee
>
> Run this AppleScript with the contacts selected:
>
> tell application "CDebug Entourage"
> set theItems to selection
> repeat with i in the theItems
> if class of i is contact then
> set StartAddress to the home address of i as postal address
> set DestinationAddress to the business address of i as postal address
> set the home address of i to DestinationAddress
> set the business address of i to StartAddress
> end if
> end repeat
> end tell

Actually you have to omit 'as postal address' to get this to work in
Entourage X, as I recall. Or maybe that got fixed for SR-1. Also "CDebug
Entourage" isn't going to do it for most people here. ;-) Anyway, try it
this way:

tell application "Microsoft Entourage"
    set theItems to selection
    repeat with i in the theItems
        if class of i is contact then
            set StartAddress to the home address of i
            set DestinationAddress to the business address of i
            set the home address of i to DestinationAddress
            set the business address of i to StartAddress
        end if
    end repeat
end tell

-- 
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <http://www.entourage.mvps.org/toc.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>
Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.
PLEASE always state which version of Entourage you are using - 2001 or X.
It's often impossible to answer your questions otherwise.


Relevant Pages

  • Re: Home/Work Addresses Reversed (Script error)
    ... > set theItems to selection ... > repeat with i in the theItems ... > set DestinationAddress to the business address of i as postal address ...
    (microsoft.public.mac.office.entourage)
  • Re: Home/Work Addresses Reversed
    ... >> set theItems to selection ... >> repeat with i in the theItems ... >> set StartAddress to the home address of i as postal address ...
    (microsoft.public.mac.office.entourage)
  • Re: Home/Work Addresses Reversed (Script error)
    ... >> set theItems to selection ... >> repeat with i in the theItems ... Entourage FAQ Page: ...
    (microsoft.public.mac.office.entourage)
  • Re: Home/Work Addresses Reversed
    ... Run this AppleScript with the contacts selected: ... set theItems to selection ... repeat with i in the theItems ...
    (microsoft.public.mac.office.entourage)