Start Outlook Mail Message w/Attachments
-
I am trying to start an instance of an Outlook mail message with a few files attached, and am having some difficulty. I have about googled my fingers off to no avail... The code I have currently will work for only 1 attachment:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("OUTLOOK.exe");
psi.Arguments = "/a \"c:\\myfile.txt\"" ;
System.Diagnostics.Process.Start(psi);I have tried specifying multiple /a command line switches to get multiple files attached such as
/a "file 1" /a "file 2"
, and I have tried arguments/a "file 1" "file 2"
as well. I have had no luck with either approach. Does anyone know of a way to specify multiple attachments through a command line argument? Thanks for your help. -
I am trying to start an instance of an Outlook mail message with a few files attached, and am having some difficulty. I have about googled my fingers off to no avail... The code I have currently will work for only 1 attachment:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("OUTLOOK.exe");
psi.Arguments = "/a \"c:\\myfile.txt\"" ;
System.Diagnostics.Process.Start(psi);I have tried specifying multiple /a command line switches to get multiple files attached such as
/a "file 1" /a "file 2"
, and I have tried arguments/a "file 1" "file 2"
as well. I have had no luck with either approach. Does anyone know of a way to specify multiple attachments through a command line argument? Thanks for your help.