Title: Re: Applescript send now
On 12/9/04 10:12 PM, "Scott Haneda" <[EMAIL PROTECTED]> wrote:

I have gotten a little more into this:
All works well, with the problem that it can not delete MyMessage, AS gives me a error about not being able to locate it.??

First of all, why are you making a draft window? Why don't you make a message and send that. And, yes, you can't delete a draft window - but you can close it saving no, which would do what you wanted. But don't make it as a window, make it as a message:

    set MyMessage to make new outgoing message with properties ¬
        {recipient:"[EMAIL PROTECTED]", subject:"admin", content:theBody}
    -- send it
   send MyMessage


No need to delete anything. If you were sending to several recipients, or cc recipients, it would be a lot more complicated. (Actually you used the wrong syntax for draft window anyway, where the property you'd need would be 'to recipients'. It is, however the correct syntax for 'outgoing message', or at least it's a simplified coercion that works.) If you don't say at which folder you want to make the message it gets made by default in the drafts folder, but as soon as you send it it gets moved (via the Outbox, where you could make it if you wished) to Sent Items folder.

All without even appearing on screen.


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

Reply via email to