Outlook 2003 Command Line Switches

  • Thread starter Thread starter jb
  • Start date Start date
J

jb

Hello,

I was trying to use some command line switches when starting Outlook to
create a new message and I received an error when combining a few switches.

This worked in opening a new message with an attachment:

"C:\Program Files\Microsoft Office\Office11\Outlook.Exe" /c IPM.Note /a
"Foo.Pdf" /NoPollMail

This worked in opening a new mail message with the TO name filled in:

"C:\Program Files\Microsoft Office\Office11\Outlook.Exe" /c IPM.Note /m
(e-mail address removed) /NoPollMail

However, when I tried to combine the /a and /m, I received an error about
Command Line Argument is not Valid.

"C:\Program Files\Microsoft Office\Office11\Outlook.Exe" /c IPM.Note /m
(e-mail address removed) /a "Foo.PDF" /NoPollMail

I looked at the help and I think these two are permitted, but it does not
work. I tried switching the order of the switches and removing the
NoPollMail, but nothing worked. Any ideas?

Also, is there a way to get a default subject put in as well as some default
text in the message, or do I have to go to scripting for that to happen?

Thanks for help.

John
 
jb said:
I was trying to use some command line switches when starting Outlook
to create a new message and I received an error when combining a few
switches. ....snip...
However, when I tried to combine the /a and /m, I received an error
about Command Line Argument is not Valid.

Correct. The /a and /m switched are mutually exclusive. If you look at
your Help again in the description of the /m switch it says, "Only works in
conjunction with the /c command-line switch." In other words, if you use
/m, the only other switch you can use on the same command line is /c.

Conceivably you can use a mailto shortcut to click on in a document or a
draft item. See http://www.ianr.unl.edu/internet/mailto.html
 
jb said:
I was trying to use some command line switches when starting Outlook
to create a new message and I received an error when combining a few
switches.

Well, either Outlook has it wrong or the web site I referenced has it wrong.
Outlook does not recognize the "?&xxx" mailto extensions. If you leave off
the "&", then they work. For example, the web site shows:

MailTo with message already started in Body
<a href="mailto:[email protected]?&body=I am having trouble finding
information on ">

Outlook will obey it if you write it as:

<a href="mailto:[email protected]?body=I am having trouble finding information
on">
 
Back
Top