How to launch Outlook with parameters

  • Thread starter Thread starter Star
  • Start date Start date
S

Star

Hi all,

I have searching the newsgroups for a while but I couldn't find anything.

What I need is to launch outlook with some fields already filled out,
like the subject, 'to' and body fields.

Is there anyway of doing that?

I'm using C#

Thanks
 
What are you trying to achieve?

Outlook has a great object model that lets you do all manner of things under
program control.
 
Thanks for your help.

I don't really need to send the emails internally from my program. I
just want to launch Outlook with some parameters.

Anyway, I got it to work just by doing this:

String cURL;
cURL="mailto:[email protected]&Subject=Please%2C%20I%20insist%21&Body=test";

System.Diagnostics.Process.Start("IExplore",cURL);
 
Have you tried using the simple mailto?

Something like the following should do the trick:


System.Diagnostics.Process.Start("mailto:[email protected]?subject=blah&body=Hello world!", "poutlook");

Not sure how to force an account though.
 
Thanks, that works even better than my previous solution.

String cURL;
cURL="mailto:[email protected]&Subject=Please%2C%20I%20insist%21&Body=test";

System.Diagnostics.Process.Start("IExplore",cURL);
 
On Windows Mobile 5.0 and above you can use
Microsoft.WindowsMobile.PocketOutlook.MessagingApplication.DisplayComposeForm.

Peter
 
Back
Top