outlook 2003 command line argument, SP3 problem

  • Thread starter Thread starter DSA
  • Start date Start date
D

DSA

I have a program which uses a command line argument to launch outlook
with an email attachment. it worked fine until SP3 was installed.

no i am getting an invalid command line argument error

anyone else had any problems ?
 
The argument that worked fine before sp3 was
mailto:[email protected]?subject=Manual&attachment=""C:\file.txt""

for outlook versions 2002 and below the argument was
mailto:[email protected]?subject=Manual&attachment="C:\file.txt"

notice it is the same except for double quotes around the file name.

To see what I mean,if you go to start->run and type in
mailto:[email protected]?subject=Manual
it will create an email to (e-mail address removed) with subject "manual"

I am trying to get the attachment part working again
 
Aha, then you are not using Outlook command line arguments at all but the
MailTo protocol. That is a big difference.

"attachment" or even "attach" is not a valid argument.
See Microsoft's documentation;
http://msdn2.microsoft.com/en-us/library/Aa767737.aspx

and the official RFC documentation concerned about this;
http://ftp.isi.edu/in-notes/rfc2368.txt

It could have been supported in previous versions as a "protocol extension"
offered by Microsoft but was dropped now that Microsoft is more or less
pressured to comply with RFC documentation.

The proper way to do it for an Outlook command line is;
"C:\Program Files\Microsoft Office\Office11\Outlook.exe" /a "C:\My
Documents\labels.doc"

Since you are doing it from a program and if you are the developer I suggest
you use the Outlook Object Model instead of command line arguments.
 
Back
Top