Script to copy contacts from public folder?

M

Michael Rose

Hi all,

I'm trying (and struggling) to develop a script to handle a particular
Entourage/Exchange task (Entourage 2004 11.2.5, Exchange 2003): copying
contacts from a public folder address book to an Exchange "personal"
address book. I noticed some postings on a similar topic from a couple
of months ago and I was wondering if anyone had made progress on
accessing non-favorite public folders (or alternatively, favoritizing
public folders) via a script. My AppleScript mojo is weak. :-(

We're trying to get around the problem of a lack of LDAP access for our
remote users by creating a public folder full of corporate contacts --
a super GAL. Works fine as a Favorite public folder, EXCEPT for those
pesky Blackberry/Treo/WinMobile users who want to have the corporate
contacts available and don't want to do lookups for them; it's also
easier to populate with extra info (cell numbers, etc.) than the GAL
is. It would also be nice (but not mandatory) to be able to use things
like EntourageABMenu against these addresses, which would require
copying them somewhere else. Ideally this script would be run on a
weekly schedule, or triggered by the user as needed.

Here's what we're trying to script [wish listy items in brackets]:

1. Select all the contacts in the placeholder Exchange address book
"Corp_Local" [or alternatively all the contacts with a "Corp_Local"
category -- Treo and WinMo5 devices only sync up "Contacts" folder so
they may need to go in there] and delete them or move to an archive AB
-- clear out the results of last sync.

2. [are we online? if not, fail or display "retry later" dialog]
Display the "Corp_Public" public folder address book. Wait 1 minute to
sync up. [If the address book is a favorite, the wait is unnecessary]

3. Select all the contact records in the "Corp_Public" address book and
copy them to "Corp_Local." [Assign them all a category of "Corp_Local,"
could use the Custom 8 field script or similar.]

Some of the issues I've seen in *extremely* preliminary poking at the
script --

a) The IDs of public folder address books change from user to user.
This would not be such a big deal if I could hunt them down by name,
but;

b) for public folder address books that are NOT favorites, I don't seem
to be able to look up the ID by name. I can check the ID if the book is
selected ("get the displayed feature of front window") but then 'get
the id of address book "Corp_Public"' fails. This is not really that
surprising, but still annoying. Likewise I can't display or select
public folder address books by their URLs.

------

If anyone has suggestions, alternate approaches, consulting offers or
help, it would be much appreciated.

thanks,
--Mike
miketrose at gmail dot com

P.S. If the GAL search functionality exposed by the "do OWA GAL search"
AppleScript command really does work via HTTP and not LDAP... why the
heck isn't there an interface for it in Entourage? It would really make
this a lot easier. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top