On 11/1/04 5:09 PM, "Mike Dano" <[EMAIL PROTECTED]> wrote:

> Is there a way to remove all instances of "Re:" in a subject without having
> to mark positions and do the "4 thru -1" type of calculations?

Yes, but it will leave spaces:

set theSubject to subject of theMsg
if theSubject  contains "Re:" then
    set AppleScript's text item delimiters to {"Re: "} -- or ("Re:"}
    set ls to text items of theSubject
    set AppleScript's text item delimiters to {""}
    set subject of theMsg to (ls as Unicode text)
end if


I recommend using {"Re: "}. It will remove the space at the end. I can't
believe you'll hit any "Re:" without a space. (If you do, this version will
miss it.)


-- 
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/>

Reply via email to