Outgoing rules for category & project

N

n9vjg

Does anyone know why the Project and Category options are missing for
Outgoing Rules tab? Is there a way to override this or lobby for the
options in the next upgrade? I have messages I send related to certain
projects and I would like them moved to specific folders after I send
them.
 
B

Barry Wainwright [MVP]

Does anyone know why the Project and Category options are missing for
Outgoing Rules tab?

I don't know
Is there a way to override this
No.

or lobby for the
options in the next upgrade?

You just did - these newsgroups are monitored by the MacBU staff and they do
take notice of common requests.
 
P

Paul Berkowitz

Does anyone know why the Project and Category options are missing for
Outgoing Rules tab? Is there a way to override this or lobby for the
options in the next upgrade? I have messages I send related to certain
projects and I would like them moved to specific folders after I send
them.


There's no _good_ reason that I can see: it should be simple enough for the
Rules engine to check those settings in the database.

One of the actions that an outgoing rule can take is to Run AppleScript. So
an outgoing rule could be set to check _every message_, and the script could
check for category and for project, and also to take specific actions
depending on the result of the check. You'd really have to write your own,
but here's the general idea:

tell application "Microsoft Entourage"
set theMsg to item 1 of (get current messages)
if theMsg's category contains {category "Family"} then
move theMsg to folder "Family"
else if theMsg's category contains {category "Client 1"} then
move theMsg to folder "Client 1" of folder "All Clients"
else if theMsg's project list contains {project "Special Client 12"}
then
move theMsg to folder "Special Client 12" of folder "Special
Clients" of IMAP account "My IMAP Acct"
end if
end tell

The second and third example show you how to refer to subfolders, the third
example shows you how to refer to an IMAP folder (and a move to an IMAP
folder will only work with Entourage 11.2). You can run on as many 'else if'
as you like.

If you sometimes give messages more than one category, or a category and a
project, you'll have to work out the best order to list the 'if' and 'else
if': once it's moved, that's it. Or you'd need to get complicated by
specifying what to do in precise cases. If the project matters more than the
category, specify the project list lines before any category lines. If
messages can have more than one category but the one that natters is the
first category (prime category, that shows the color), do it like this:

tell application "Microsoft Entourage"
set theMsg to item 1 of (get current messages)
set {theProjects, theCategories} to theMsg's {project list, category}
if theProjects ‚ {} then
if item 1 of theProjects = project "Special Client 12" then
move theMsg to folder "Special Client 12" of folder "Special
Clients" of IMAP account "My IMAP Acct"
else if item 1 of theProjects = "Special Client 13" then
move theMsg to folder "Special Client 13" of folder "Special
Clients" of IMAP account "My IMAP Acct"
end if
else if theCategories ‚ {} then
if item 1 of theCategories = "Client 1" then
move theMsg to folder "Client 1" of folder "All Clients"
else if item 1 of theCategories = "Family" then
move theMsg to folder "Family" of folder "Family"
end if
end if
end tell


In this case, you don't have to worry about the order of which 'else if' you
put first: the primacy is established by whichever category or project is
primary. Just decide whether the Project or the Category is more important
and put that part of the script first.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
N

n9vjg

Wow. Thanks. But scripting is a bit out of my current brain capacity
(smile). I do have other projects and categories that would need
matching. Maybe I'll force myself to learn when I get the free time.
Nevertheless, the help is greatly appreciated. At least I know it CAN
be done.
 
Top