Title: Re: Find and replace
On 4/19/02 9:16 AM, "Dirk Heinze" <[EMAIL PROTECTED]> wrote:

> Hi
>
> Is it possible to not find & replace words in the addressbook of Entourage
> 2001, like the name of a city? Of course I have a lot words to replace, so
> it needs too long time to replance manual.

You can do it by AppleScript. It's much easier, quicker and safer if you can specify which field the word is in. For example:

    tell application "Microsoft Entourage"
        set theContacts to every contact    
        repeat with theContact in theContacts
           if home city of theContact = "West Berlin" then
             set home city of theContact to "Berlin"
           end if
           if work city of theContact = "West Berlin" then
             set work city of theContact to "Berlin"
           end if
        end repeat
    end tell


Actually, something like this might work a lot faster, for several possibilities ("West Berlin", "W. Berlin", "East Berlin", "E. Berlin", "Berlin"), all at once

    tell application "Microsoft Entourage"
        set theContacts to every contact  where its home city contains "Berlin" or  its work city contains "Berlin"
        repeat with theContact in theContacts
           if home city of theContact contains "Berlin" then
             set home city of theContact to "Berlin"
           end if
           if work city of theContact contains "Berlin" then
             set work city of theContact to "Berlin"
           end if
        end repeat
    end tell




>
> Beside this, many thanks to Paul and Allen for the wonderful scripts, which
> have helped me so much. Especially the script "Seperate Group Messages 1.2"
> is fascinating! And it works also in my German Entourage version.
>
Good to hear. As soon  as Apple fixes a few bugs with its Unicode implementation, i should be able to revise most of my scripts so they will work also with Japanese, Chinese, Russian, Czech, etc. as well as with the Western European languages which work OK now.


--
Paul Berkowitz

Reply via email to