Auto-save OE 5 attachments
Auto-save OE 5 attachments
- Subject: Auto-save OE 5 attachments
- From: Steve Savery <email@hidden>
- Date: Fri, 25 Oct 2002 13:58:20 +0100
Hello
I'm relatively new to AppleScript, although I have written a few simple
scripts for my own use.
I want to be able to get Outlook Express to automatically save all
attachments for each email received (as it is received) to a new folder
with the new folders name made up from elements of the email message
(ie Subject and Senders name). So far, I've not been able to get
anything to work. Below is my code for you to (laugh) look at.
on processMail(MyMessage)
set disk_production to alias of "Production"
if attachment of MyMessage > 0 then
tell application "Outlook Express"
set mySenderName to display name of MyMessage
set mySubject to subject of MyMessage
set myDate to weekday of date sent of MyMessage & " " & day of date
sent of MyMessage as string
if length of (mySenderName & " " & mySubject & " Sent at " & myDate)
< 30 then
set new_folder_name to mySenderName & " " & mySubject & " Sent at "
& myDate
else
set new_folder_name to mySenderName & " " & myDate
end if
--set create_location to "Production:Sales Email Attachements"
--set stored_location to create_location & ":" & new_folder_name
end tell
tell application "Finder"
(*if disk_production exists then
--do nothing
else
mount volume "afp://193.115.84.20/production/" --without message
end if
if exists stored_location then
delete stored_location
end if*)
make new folder at desktop of startup disk with properties
{name:new_folder_name}
end tell
tell application "Outlook Express"
save (attachments from MyMessage to stored_location)
end tell
end if
end processMail
If anybody can help I'd really appreciate it. I'm a quick learner and
have recently bought the book "AppleScript for Applications" by Ethan
Wilde.
Thanks,
Steve
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.