Title: Re: How to Sync Fields that are in the Entourage Address Book that are not on the Palm
On 7/30/02 8:33 PM, "Peter Wait" <[EMAIL PROTECTED]> wrote:

Paul BerkowitzPeter Wait

Here is my attempted AppleScript to move several items to the “Notes”, following the suggestions at the bottom below:

tell application "Microsoft Entourage"
    set selc to every contact whose (birthday � "" or nickname � "" or anniversary � "")
    repeat with i from 1 to (count my selc)
        set c to item i of my selc
       tell c
           if its nickname � "" then
               set its description to ("Nickname: " & (get its nickname) & return)
            end if
           if its birthday � "" then
               set its description to ("Birthday: " & (get its birthday) & " [" & (get its age) & "]" & return)
            end if
           if its anniversary � "" then
               set its description to ("Anniversary: " & (get its anniversary) & return)
            end if
       end tell
   end repeat
end
tell

But I’m afraid running it could mess up my address book. What folder contains the Entourage addresses, so I can save it elsewhere, and then restore it if need be? Also, if there are any glaring errors, I’d appreciate the feedback.

1. The logic isn't good, Peter. You would mess up your Address Book this way.

Your initial list of contacts consists of every contact which has a nickname, a birthday or an anniversary listed. that's good. But some of them will have two or all three of these properties. Yet your script will only allow the last item into the notes. Furthermore you're going to wipe out any Notes that are already there.  i already showed you how to do this, I think, and i believe Allen did too. You have to set a variable to the current notes, then add on to it these extra values, then finally at the end reset the notes to the accumulated value.

tell application "Microsoft Entourage"
    set selc to every contact whose (birthday � "" or nickname � "" or anniversary � "")
    repeat with i from 1 to (count my selc)
        set c to item i of my selc
       tell c
           set theNotes to its description
           if theNotes � "" then set theNotes to theNotes & return
           if its nickname � "" then
               set theNotes to theNotes & ("Nickname: " & (get its nickname) & return)
            end if
           if its birthday � "" then
               set theNotes to theNotes & ("Birthday: " & (get its birthday) & " [" & (get its age) & "]" & return)
            end if
           if its anniversary � "" then
               set theNotes to theNotes & ("Anniversary: " & (get its anniversary) & return)
            end if
           set its description to theNotes
       end tell
   end repeat
end
tell


2. There is no separate file or folder for the Address Book. You'd have to back up your whole identity. In Entourage X that's here:

    ["Home"]/Documents/Microsoft User Data/Office X Identities/Mail Identity/
            [or whatever you might have renamed your identity to]

which you might have discovered this way:

    tell application "Microsoft Entourage" to get path to MUD

if you'd known about it.



--
Paul Berkowitz

Reply via email to