Re: Adding a category to an item in Entourage
Re: Adding a category to an item in Entourage
- Subject: Re: Adding a category to an item in Entourage
- From: "Rebecca O'Connell" <email@hidden>
- Date: Fri, 12 Mar 2004 10:09:29 -0500
Working in MS Entourage 2001...
tell application "Microsoft Entourage"
set c to {first category whose name is "archived"}
--the category needs to be a list item or else it will trigger a "can't make
c a vector" error
set theList to the selection
repeat with theItem in theList
--If you add a category to a contact that already has that category
Entourage assigns the category twice, which, depending on what you do with
the contact after that, may cause Entourage to crash and otherwise freak
out, so its good to make sure that your script doen't do that
set theCats to (category of theItem )
if theCats does not contain c then
set category of theItem to (category of theContact) & c
end if
end repeat
end tell
Hope this helps,
Rebecca
On 3/12/04 9:46 AM, "Todd Geist" <email@hidden> wrote:
>
Hello again,
>
>
I am trying to add a category to selected items in Entourage. Here is what
>
I have so far.
>
>
-----
>
tell application "Microsoft Entourage"
>
>
set c to the first category whose name is "archived"
>
set theList to the selection
>
>
repeat with theItem in theList
>
tell theItem
>
--set theCategories to category
>
copy c to the end of category
>
end tell
>
end repeat
>
>
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.