Applescript and outlook 2011 reply email keeping original body

Advertisement

Hi,
I need help with an applescript.
The idea is...
I receive an email on Outlook 2011, and I can just run this applescript and it will create a response based on the original mail, with a predefined message.
Right now it's working up to the point of creating a reply, adding the message and sending it. However, it is NOT keeping the original content of the message. that I'm replying to.
Can someone help me with that part?
I've tried many stuff and someone else helped me getting this one to work:
tell application "Microsoft Outlook"
    set replyToMessage to selection
    if (replyToMessage is "") then -- nothing selected, don't continue
        log ("NOTHING SELECTED!")
        return
    end if
    set replyMessageSubj to subject of replyToMessage
    set replyMessage to reply to replyToMessage without opening window
    if has html of replyMessage then
        log ("HTML!")
        set the content of replyMessage to "<p>Working on HTML</p><br />"
    else
        log ("PLAIN TEXT!")
        set the plain text content of replyMessage to "Working on plain text"
    end if
    send replyMessage
end tell
Many thanks for the help.

Advertisement

That's exactly what I needed to understand.
The final one is like this in case someone else needs it:
tell application "Microsoft Outlook"
    set replyToMessage to selection
    set mymessage to "Aqui se trapeo con jerga"
    set OldContent to content of replyToMessage
    if (replyToMessage is "") then
        log ("NOTHING SELECTED!")
        return
    end if
    set replyMessageSubj to subject of replyToMessage
    set replyMessage to reply to replyToMessage without opening window
    if has html of replyMessage then
        log ("HTML!")
        set the content of replyMessage to "Hello World<br> This is an HTML test<br><br><br><hr>" & OldContent
    else
        log ("PLAIN TEXT!")
        set the content of replyMessage to "Hello World<br> This is a plain text test <br><br><br><hr>" & OldContent
    end if
    open replyMessage
end tell
Many thanks for the help Llessur999!!

November 30, -0001

Applescript and outlook 2011 reply email keeping original body

Hi, I need help with an applescript. The idea is... I receive an email on Outlook 2011, and I can just run this applescript and it will create a response based on the original mail, with a predefined message. Right now it's working up to the point of

I have recently bought a macbook and am using outlook 2011 as email. i am getting an error message 4.7.0 not allowed when sending emails how do I fix?

i have a macbook and am using outlook 2011 as email.   receiving okay.   sending okay sometimes.  am now getting error message 4.7.0 not allowed when sending.  what is the cause? how do I fix please?I have discovered that the emails have in fact been

Has anyone had recent issues with iCloud mail and Outlook 2011?

Two days ago without warning when sending an e-mail from Outlook 2011 from a MacBook Pro running 10.8. (Have a .mac account), I had an error pop up, see below. Tried entering the password but the same error popped up. Thought there might be an error

I cannot find MACs new 'Photos' in Finder under 'Media' when I try to attach a picture using Outlook 2011 for email.

Hi I am using Outlook 2011 and i have today uploaded MAC's new 'Photos'. When I try and attach a photo Finder no longer show the IPhoto liv=brary in Finder under Media and there is no replacement. Help i need to send a photos using the attach button

Email not always delivered to both BB and Outlook - Comcast is email server

I am getting some emails only on the BB or only in Outlook.  Not all messages are being delivered to both.  Messages forwarded to my Comcast account are only picked up in Outlook.  Messages emailed from another BB to my Comcast account are only picke

ICloud and Outlook 2011 for mac

I currently run an imac, iphone and windows laptop. For e mail and calander I wish to use MS Office (it is what I am used to and is the system at work) and I have office for mac. On my laptop i can synce outlook with the iColud but on my mac version

Mac Air and Outlook sounds

I have a new MacBook Air, and using Outlook 2011 for email.  Often I keep my headphones plugged in, and most times when I unplug them, I suddenly start hearing a series of chimes coming out of the speakers - assuming its all the email chimes/notices

Synchronisation from iCal to Outlook 2011 for MAC

I am wondering when Apple will start supporting reminder/task synchronisation between iCal---iCloud---Office 2011 Mac. Even though new Office versions have been released Outlook 2011 will be around for some time and this would be something rather sim

Keeping Gmail email addresss and using Outlook 2011 for Mac and Exchange

Hi, we use gmail for email at present with Outlook on a Mac. Having found that contacts and calendars cannot be synched between Oulook for Mac and Gmail I want to use exchange as a means of getting this sync working between my iPhne, iPad and OSX cal

Outlook 2011 slow, clunky and keeps crashing with macbook pro os 10.8.4 - any hints??  ta :)

Outlook 2011 slow, clunky and keeps crashing with macbook pro os x 10.8.4 - any hints??  taYou might look in your User Library for Outlook .plist(s). They probably start with com.microsoft. Quit Outlook. Either hold down the option key while using th

Why do i get prompted to enter password for mac outlook 2011 intermittently? the password is correct and it is annoying to keep getting prompted

why do i get prompted to enter password for mac outlook 2011 intermittently? the password is correct and it is annoying to keep getting promptedApplications/Utilities/Keychain Access - delete the password there. While there, Keychain Access menu/Firs

Using AppleScript to auto-archive mail in Outlook 2011

I want to use AppleScript to set up a schedule to auto-archive mail greater than X days old. What I've found so far is below, and the error I'm receiving is "error "Microsoft Outlook got an error: Can’t get pop account \"TargetProcess\"

Need Help Converting a VBA Macro to AppleScript 2.1.2 for Outlook 2011

Hello AppleScript Experts: Can somebody help me convert the below VBA Macro to an equivalent AppleScript 2.1.2 for Mac Outlook 2011 (Version 14.1.3) I have a VBA macro program that pops message box when somebody sends an email to an external email ad

How to export Apple mail emails to Microsoft Outlook 2011 for mac?

Please provide some solution to migrate apple mail emails to outlook 2011 for mac. NOTE: emails from the server have been deleted.Hi, Please check if this helps: http://support.microsoft.com/kb/2413370/en-us Since this forum is for general questions

While composing email, keep getting "Unable to save as a draft" every 30 seconds. I've disable auto save and it didn't help.How can I stop this message?

While composing email, keep getting "Unable to save as a draft" every 30 seconds. I've disable auto save and it didn't help.How can I stop this message?Mike, Thank you for taking the time to look at my app. This is my last major stumbling block

Outlook reply email font is tiny

I have outlook for Mac and when I reply to someone's email, the font size is fine. But, the font is tiny on their end. My signature is showing up normal, but the body is showing up as a size 7. When I type the reply email, it is showing at 14pt font.

Export apple mail emails to outlook 2011

I installed Ms office 2011 in mac book pro a couple of days ago. I need to transfer emails from apple mail to outlook 2011. I see import option for apple mail in outlook import wizard. So hoe can I import apple mail emails in outlook without any data

Cannot import email from Winxp Outlook 2003 to Mountain Lion Outlook 2011

Currenlty switch from Trad. Chines Winxp Prof. SP3, MS Office 2003 (all updated) to MacBook Air Mountain Lion Outlook 2011 (both in English version and updated). Tried to direct copy 'Outlook.pst', export 'Inbox' folder from Outlook 2003 than impirt

Mavericks and Outlook - repeated download of same emails

Since my Mavericks upgrade my outlook 2011 download duplicate emails that have already been received.  I rebuilt my identity database and it did not help.  I am on Outlook 14.3.8 (Outlook 2011).  Does anyone know how to either fix this issue permanen

Attach to email not working with Outlook 2011

I've created a pdf document for users to fill out and then click a SUBMIT button which attaches the document to an email and sends it back to me.  It works great with Windows users, however, it fails to create an email for Mac users with Outlook 2011