Automatic Category Labeling

W

webport

In Outlook, I was able to set up a "rule" to automatically label
calendar entries with a certain color and am looking for a way to do it
in Entourage 2004. In my exchange calendars, we assign people jobs with
their initials (eg. ABC at Downtown Office). So anytime ABC shows up in
the calendar, I would automatically like it labeled with a certian
color (category). And for person DEF to be labeled with a different
color. I have been searching for a way to do this with applescript or
automator but havent been able to find any answers. Any help?

Thanks in advance.
 
B

Barry Wainwright [MVP]

I know what you mean, this is a very nice feature in Outlook - especially
for calendars in public folders where lots of people can be adding events.

It would be possible to do it with AppleScript, setting a script to run
periodically by a schedule, and have the script get every event without a
category set, and apply categories according to the rules you desire.

Do you need help to get the script under way?
 
W

webport

PLEEEEEEAAAAASEEEEE!
That would be fantastic. I figured it could be done with applescript
but I am new to Mac and didnt really understand what I was reading
about it online. Played with the script editor a little, but didnt get
anywhere.

What I would like is a script that would search all my calendars
(public and private) and automatically apply a category/color to the
calendar entries based on an entry in the subject line. So, if person
ABC's initials show up in the subject line, they would automatically be
assigned to one category/color and so on.

Any help you can provide would be greatly appreciated! Thanks so much!
 
B

Barry Wainwright [MVP]

Here is the basis of such a script.

In the 'categorise' handler, you need to add your criteria and category
names.

As it is here, the script does no error checking, so if you mis-spell a
category, or use a category name that hasn't been created yet, the script
will error.

Later, if you need help, I can show you how to trap these errors.


tell application "Microsoft Entourage"
repeat with aCalendar in every calendar
set theEvents to (every event of aCalendar where its category is {})
repeat with anEvent in theEvents
my categorise(anEvent)
end repeat
end repeat
end tell

on categorise(thisevent)
tell application "Microsoft Entourage"
-- repeat the following line as many times as you want, with
different
-- search text and category names
-- make sure the category exists first!
if subject of thisevent contains "School" then set category of
thisevent to category "School"
end tell
end categorise



Save the script as a compiled script & put it in the ŒEntourage Script Menu
Items¹ folder in your ŒMicrosoft User Data¹ folder. The script can be
manually run from the menu or called up from a schedule.
 
W

webport

Barry,

Thank you so much for taking the time to write this script for me.
Unfortunately, I dont understand half of what you wrote or how to
implement it. This weekend, I plan on doing some reading so that I can
understand the basics of applescript and I am sure that I can get it
all figured out and properly implement your script. If I have any
trouble, I will shoot you a line. Thanks again!

Jay
 

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