Hi and thanks for the hint !
I know this might be slightly off topic since actually it¹s more about
scripting than Entourage, but this subject is very useful...

Is there a way to refer to the ³previous month² in the script in order to
move\keep messages together by month instead of being older than X days ?

I have tried this to refer to months but it¹s not correct...
(January minus 1 equal to ³0²)

set presentmonth to get (month of (current date))
set pastmonth to (presentmonth - 1)
.......
.......

Or this

set pastmonth to ((current date)'s month) - 1
tell application "Microsoft Entourage"
    move (every message in (get sent items folder of Exchange account 1)
whose time received = pastmonth) to sent items folder
end tell

but it does not work either

Many thanks for your help!
Ciao
Carlo



Da: Paul Berkowitz <[EMAIL PROTECTED]>
Risposta: "Entourage:mac Talk" <[email protected]>
Data: Sat, 05 Jan 2008 13:28:15 -0800
A: Entourage Mac Talk <[email protected]>
Conversazione: automatically move emails to local folders
Oggetto: Re: automatically move emails to local folders

With an AppleScript that did the same thing, create a schedule to run it
once a month.

I can't recall if 'move' works from Exchange to local in AppleScript without
having to delete afterwards, and don't have an Exchange account to test
with, but I think so.

set _30DaysAgo to (current date) - (30 * days)
tell application "Microsoft Entourage"
    move (every message in (get sent items folder of Exchange account 1)
whose time received > _30DaysAgo) to sent items folder
end tell

(I'm using 'time received' rather than 'time sent' to avoid problems with
messages sent with false dates such as spam sent with dates in the future,
but adjust it if you wish.)  Try it out once to see if it works as is. If
so, save the script to the Entourage Script Menu Items folder in the
Microsoft User Data folder, and create a schedule to run it every month.

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

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


> From: Ferdinand Fuchs <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[email protected]>
> Date: Sat, 5 Jan 2008 21:12:34 +0100
> To: "Entourage:mac Talk" <[email protected]>
> Subject: automatically move emails to local folders
> 
> hello,
> 
> I created a rule, that move every email (older than 30 days) from my
> sent items-folder (exchange account) to my local sent items folder.
> 
> It would be cool to do that automatically, so I tried to make a
> sheduler-event for that rule - but I can't choose a rule in the
> sheduler - are there any tricks to do that?
> 
> thanks,
> 
> 
> ferdinand
> 
> -- 
> To unsubscribe:  
> <mailto:[EMAIL PROTECTED]>
> archives:       
> <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
> old-archive:     
> <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
> 
> 


Reply via email to