On 18/1/07 14:55, "Pam Lefkowitz" <[EMAIL PROTECTED]> wrote:
> On 1/18/07 6:27 AM, "Allen Hancock" <[EMAIL PROTECTED]> wrote: > >> I will >> have to find out how she managed to create the vcards in a way that >> made e'rage create a new category for each and every one! > > It wasn't her fault. She did nothing special to get it to happen. > > This happens anytime I'm trying to bring in vcards from Address Book. I > drag/drop 100 (pick a number) cards from AB to the desktop, they save as > vcard. Drag them into Entourage and - poof - 100 categories. Each card adds > a category. Very inconvenient. I really don't need 100 client categories - 1 > will serve me just fine thanks. > > Barry, your script removes all the categories, yes? How would it be adjusted > to remove all but 1 of the <categoryname>? So, I already have business, > client, personal. But the import of the vcards gave me 100 more client > categories. How would we adjust the script so it deletes all but one client > category? Or can that even be done? > > Pam > It can be done - this should do it. -- Remove Duplicate Categories -- A script for Microsoft Entourage -- Removes duplicate categories, without assigning items in the removed category -- to the original category of the same name -- an Applescript by Barry Wainwright <mailto:[EMAIL PROTECTED]> -- This script released under a Creative Commons Attribution, NonCommercial, ShareAlike 2.0 England & Wales License. -- see <http://creativecommons.org/licenses/by-nc-sa/2.0/uk/> for full details tell application "Microsoft Entourage" set theCategories to categories repeat with x from 1 to count theCategories repeat with y from (count theCategories) to x + 1 by -1 if name of item y of theCategories = name of item x of theCategories then delete (get item y of theCategories) set theCategories to items 1 thru (y - 1) of theCategories & items (y + 1) thru -1 of theCategories end if end repeat end repeat end tell There are quicker ways, but I did it this way because I want to look at moving items back to the main category next. This first pass doesn't do that. -- Barry Wainwright Microsoft MVP (see http://mvp.support.microsoft.com for details) The Entourage User's WebLog has moved! For hints, tips and troubleshooting go to <http://www.barryw.net/weblog/>
