On 10/31/04 11:25 PM, "Mike Dano" <[EMAIL PROTECTED]> wrote:
> I tried to go in and modify some existing AppleScripts but they were a
> little to complex for me to figure out. Is there a simple way to replace any
> instance of "Re:", "Re: ", " Re:" or " Re: " in a subject with nothing ("")?
Frankly, I've never ever seen a subject start with " Re:" but I'll take your
word for it.
repeat with theMsg in (get current messages)
set theSubject to subject of theMsg
if theSubject starts with "Re:" or theSubject starts with " Re:" then
try
if theSubject starts with "Re:" then
set theSubject to text 4 thru -1 of theSubject
else if theSubject starts with " Re:" then
set theSubject to text 5 thru -1 of theSubject
end if
repeat while theSubject starts with " "
set theSubject to text 2 thru -1 of theSubject
end repeat
on error -- <no subject>
set theSubject to ""
end try
set subject of theMsg to theSubject
end if
end repeat
--
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.
--
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/>