Need advise launching 2013 Outlook from a DOS command line

April 29, 2015 at 06:23:23
Specs: Windows 7
Good day.

I've been trying to launch an email from a DOS command line using the string shown below. The Microsoft Outlook version is 2013, OS is Windows 7.
The command works without the variables, %subj% and %site%; I've tried various permutations, ie. %subj% %%subj ^%subj% ^%subj^% \%subj%, none of which work.

@echo off
echo Mail test
set /p subj= Enter SubjectID: 
set /p site= Enter Decription: 
call "C:\Program Files (x86)\Microsoft Office\Office15\outlook.exe" /c ipm.note /m "; subject %subj%&body=This is a test for a new %site%.

Anybody have an answer?


See More: Need advise launching 2013 Outlook from a DOS command line

Report •

April 29, 2015 at 13:57:53
I'm not strong with command line, but one thing that sticks out at me is the quotation marks before the email address. Might not be relevant...

Did you look at the MSKB articles on the subject?

message edited by Jennifer SUMN

Report •

October 24, 2017 at 17:21:15
You can't start it from DOS. It's a Windows binary.

You can start it from a Windows command line prompt. I'd check the program location first and make sure you have it right.

Report •

January 4, 2018 at 20:14:49
I'm not exactly sure what you are actually trying to accomplish.
But you are not running Outlook in DOS. You are trying to write a script to trigger an Outlook function within Windows.
So you are probably in the wrong forum.

But a good guide to what is possible to accomplish with Outlook switches, try reviewing this:

Good luck.

Report •
Related Solutions

Ask Question