Need help Outlook command line options

D

Dave Ringot

I'm trying to find out how to launch a new mail message in Outlook from a
command line. I looked in the help and found the list of command line
options, but I'm having problems trying to combine them. Here's a list of
commands I'm using:

Open a new mail message: outlook.exe /c ipm.note

Open a new mail message and populate sender: outlook.exe /c ipm.note /m
(e-mail address removed)

Open a new mail message with attachment: outlook.exe /c ipm.note /a
filename

All of these work fine, but when I try to specify a recipient e-mail address
and an attachment, I get an error message telling me to check my command
line switches. Here's an example of the command I'm using:

outlook.exe /c ipm.note /m (e-mail address removed) /a filename

Like I said, these commands work fine individually, but when I combine them
as in the previous example, I get an error message. Any ideas? I'm also
looking for a command line switch to populate the subject line, in case
anyone knows how to do that.

TIA - Dave
 
M

Milly Staples [MVP - Outlook]

Enclose the command in brackets?

--
Milly Staples [MVP - Outlook]

Post all replies to the group to keep the discussion intact. Due to
the (insert latest virus name here) virus, all mail sent to my personal
account will be deleted without reading.

After searching google.groups.com and finding no answer, Dave Ringot asked:

| I'm trying to find out how to launch a new mail message in Outlook
| from a command line. I looked in the help and found the list of
| command line options, but I'm having problems trying to combine them.
| Here's a list of commands I'm using:
|
| Open a new mail message: outlook.exe /c ipm.note
|
| Open a new mail message and populate sender: outlook.exe /c ipm.note
| /m (e-mail address removed)
|
| Open a new mail message with attachment: outlook.exe /c ipm.note /a
| filename
|
| All of these work fine, but when I try to specify a recipient e-mail
| address and an attachment, I get an error message telling me to check
| my command line switches. Here's an example of the command I'm using:
|
| outlook.exe /c ipm.note /m (e-mail address removed) /a filename
|
| Like I said, these commands work fine individually, but when I
| combine them as in the previous example, I get an error message. Any
| ideas? I'm also looking for a command line switch to populate the
| subject line, in case anyone knows how to do that.
|
| TIA - Dave
 
D

Dave Ringot

I tried numerous combinations of brackets, and quotes, but they all produced
the same error message which states 'The command line argument is not valid.
Verify the switch you are using'.
 
B

Brian Tillman

Dave Ringot said:
I tried numerous combinations of brackets, and quotes, but they all
produced the same error message which states 'The command line
argument is not valid. Verify the switch you are using'.

From the Help in Outlook concerning the /m switch: "Only works in
conjunction with the /c command-line parameter." My guess is that the
presence of the /a switch is disallowing the /m switch. I'd try specifying
them in another order, though, before I gave up, like

outlook.exe /a filename /c ipm.note /m (e-mail address removed)
 
D

Dave Ringot

I tried that one already. I've tried about every different permutation I
can think of. I did some searches and found some posts complaining about
the same thing, but none of them had any solutions. I did however find out
how to specify the subject and body. Here's how you do it:

outlook.exe /c ipm.note /m
(e-mail address removed)&subject=test%20subject&body=test%20body

The %20 has to be used to produce a blank space. You can find out more
about this and other options in knowledge base article
http://support.microsoft.com/default.aspx?scid=kb;en-us;181991 .

You can also use the command below to open a new message in the default mail
program. Unfortunately, there doesn't seem to be a way to include an
attachment using this method.

mailto:[email protected]&subject=test%20subject

Dave
 
D

Dave Ringot

Did some more testing. Looks like it works fine in Outlook 2000, but not in
2002 or 2003.

Dave

Dave Ringot said:
I tried that one already. I've tried about every different permutation I
can think of. I did some searches and found some posts complaining about
the same thing, but none of them had any solutions. I did however find out
how to specify the subject and body. Here's how you do it:

outlook.exe /c ipm.note /m
(e-mail address removed)&subject=test%20subject&body=test%20body

The %20 has to be used to produce a blank space. You can find out more
about this and other options in knowledge base article
http://support.microsoft.com/default.aspx?scid=kb;en-us;181991 .

You can also use the command below to open a new message in the default mail
program. Unfortunately, there doesn't seem to be a way to include an
attachment using this method.

mailto:[email protected]&subject=test%20subject

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top