Create an Outlook email with auto-filled Receiver, Subject and Body from the Command-line (BAT)

Purpose: You want to send Outlook emails to the same Receiver with the same Subject and with the Body containing something similar in each one of your emails.

You might need to send yourself some emails to the same target regularly, and you are too lazy to fill out the blank inputs with the same details over and over again (the best ignition to automation). Then again you might want some other people to send you some details with the same template over and over again. If you answered yes to either one of the previous sentences, this post might help you.

Open outlook and fill in some of the input-fields
1
2
3
"C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE"
    /c "IPM.Note.test_130713_0856"
    /m "abc@xyz.com&subject=hello world&body=blah blah blah"
"C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE"
    /c "IPM.Note.test_130713_0856"
    /m "abc@xyz.com&subject=hello world&body=blah blah blah"
Include linebrakes in the body
1
2
3
4
5
"C:\Program Files\Microsoft Office\Office14\Outlook.exe"
/c ipm.note
/m "your@target.mail
&subject=hello world
&body=Line 1 of alert%%0D%%0ALine 2 of alert"
"C:\Program Files\Microsoft Office\Office14\Outlook.exe"
/c ipm.note
/m "your@target.mail
&subject=hello world
&body=Line 1 of alert%%0D%%0ALine 2 of alert"

One Thought on “Create an Outlook email with auto-filled Receiver, Subject and Body from the Command-line (BAT)

  1. …Or you could use simple vbscript to do the magic without Outlook 😉

Leave a Reply

Your email address will not be published. Required fields are marked *


− six = one

Post Navigation