• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Attachments to an existing message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Attachments to an existing message


  • Subject: Re: Attachments to an existing message
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 13 Sep 2001 17:20:04 -0700

On 9/13/01 3:50 PM, "Jamie Jordan" <email@hidden> wrote:

> I9m using both Outlook Express and Entourage.
>
>
>> I want to reply to a message, and then run an AppleScript which inserts the
>> text from a text file (this part is done) but then attach 2 files as
>> attachments to the existing open email. Any thoughts. Thanks.
>

set theFiles to {alias "Hard Disk:Desktop Folder:foo", alias "Hard
Disk:Desktop Folder:bar"}

tell application "Outlook express' -- or "Microsoft Entourage"

-- you already have an outgoing message or draft window 'theMsg'
repeat with i from 1 to (count theFiles)
set theFile to item i of theFiles
make new attachment at theMsg with properties {file:theFile}
end repeat

end tell



That will work with however many. If you haven't made the message yet:

set theFiles to {alias "Hard Disk:Desktop Folder:foo", alias "Hard
Disk:Desktop Folder:bar"}
set theContent to "my text file content here"

tell application "Outlook express' -- or "Microsoft Entourage"

set theAttachments to {}
repeat with i from 1 to (count theFiles)
set theFile to item i of theFiles
set end of theAttachments to {file:theFile}
end repeat

set theMsg to make new outgoing message at drafts folder with properties
{subject:"boo", content: theContent , recipient:"Joe Blow <email@hidden>",
attachment:theAttachments}

end tell


With only more than one, you don't need an outer list like theFiles or
theAttachments. Just

make new attachment at theMsg with properties {fle:theFile}

or

set theMsg to make new outgoing message at drafts folder with
properties {subject:"boo", content: theContent , recipient:"Joe Blow
<email@hidden>", attachment:{file:theFile}}


--
Paul Berkowitz
--PS I threw in the "simple" version for recipient in case you don't know
about it


References: 
 >RE: Attachments to an existing message (From: Jamie Jordan <email@hidden>)

  • Prev by Date: Re: a quickie.
  • Next by Date: Re: Security of run-only applications
  • Previous by thread: RE: Attachments to an existing message
  • Next by thread: a quickie.
  • Index(es):
    • Date
    • Thread