setting categories in Entourage X
setting categories in Entourage X
- Subject: setting categories in Entourage X
- From: garrett <email@hidden>
- Date: Tue, 25 Jun 2002 01:44:09 -0500
using Entourage X SR1:
the goal:
take an existing object in Entourage (like a contact), read its categories,
then create a new note based on some of the items in the contact.
the script:
property theCategory_SerialNumber_Name : "info_Serial Numbers"
tell application "Microsoft Entourage"
set theContact to selection
set theContact to item 1 of theContact --set the variable to the first
item in the list
set categoryList to category of theContact --get the contacts categories
set theCategories to {}
repeat with aCategory in categoryList
set end of theCategories to name of aCategory
end repeat
set theCategories to theCategories & theCategory_SerialNumber_Name
try
set NewNote to make new note with properties
{category:theCategories}
open NewNote
link NewNote to theContact
on error errMsg number errNum
display dialog "Application got an error " & errNum & return &
return & errMsg
end try
end tell
When it comes time to make the new note, I get an error: Microsoft Entourage
got an error: Expected a reference. Error -1727.
it has to to with "with properties {category:theCategories}"
if I remove that it works. an inspection of the var theCategories yields:
{"Computer_Software_Utilities", "Computer", "Computer_Sales", "info_Serial
Numbers"}
all which are valid categories...
any ideas?
--
garrett
_______________________________________________
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.