Mail Merge Manager and Attachments

I am trying to send an email for my wedding with the invite to a mailing list I have created in my Apple Contacts.  I have set up the Mail Merge Manager in Word for Mac 2011 which works but I want to include an attachment to the email and cant see how this can be done.  Is this possible?  

Thanks
|
Answer
Answer

set f to "Macintosh HD:Users:phil:Desktop:Desktop:Car update.:2L Spring 2012:Internships:PEEP Cover.docx" as alias

set e to "Macintosh HD:Users:phil:Desktop:Desktop:Car update.:2L Spring 2012:Internships:SSJR Cover.docx" as alias

tell application "Microsoft Outlook"

       repeat with theMessage in the messages of the outbox

              make new attachment at the end of theMessage with properties {file:f}

              make new attachment at the end of theMessage with properties {file:e}

       end repeat

end tell


------


Use this code here to attach more than one file/multiple files to your emails ie. cover letter, resume, etc. 


All you have to do is replace  "Macintosh HD:Users:phil:Desktop:Desktop:Car update.:2L Spring 2012:Internships:PEEP Cover.docx" and "Macintosh HD:Users:phil:Desktop:Desktop:Car update.:2L Spring 2012:Internships:SSJR Cover.docx" with the addresses of your files. 


If you want to add three or more files just copy and paste the first line of code changing the letter from f to something else (in this case as d), putting new directory, and adding another make new attachment line with properties file:d

3 people found this reply helpful

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Answer
Answer

As a starting point, you could try something like this (assuming you always wanted to grab stuff from the "Documents" folder):

set strPath to the POSIX path of alias ((path to home folder as text) & "Documents")

set f to (choose file with prompt "Please choose a file:" of type {"PDF"} ¬

default location strPath)

tell application "Microsoft Outlook"

repeat with theMessage in the messages of the outbox

make new attachment at the end of theMessage with properties {file:f}

end repeat

end tell


Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated July 19, 2021 Views 14,421 Applies to: