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

Re: How to launch Outlook with parameters by Richard

Richard
Sat Nov 24 11:36:06 PST 2007

What are you trying to achieve?

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


--
Richard Jones
MVP - Device Application Development
www.binaryrefinery.com

"Star" <star@nospam.com> wrote in message
news:%23NbhWBtLIHA.4456@TK2MSFTNGP03.phx.gbl...
> 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


Re: How to launch Outlook with parameters by Erel

Erel
Sat Nov 24 11:39:20 PST 2007

I don't know if it is possible to launch outlook with these arguments,
but if you are targeting WM5.0 or WM6.0 you can use the PocketOutlook
namespace to send emails (and much more):
http://msdn2.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.aspx

Re: How to launch Outlook with parameters by Star

Star
Sat Nov 24 17:40:01 PST 2007

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:abbeyvet@outfront.net&Subject=Please%2C%20I%20insist%21&Body=test";

System.Diagnostics.Process.Start("IExplore",cURL);



Star wrote:
> 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

RE: How to launch Outlook with parameters by srhartone

srhartone
Sun Nov 25 10:37:00 PST 2007

Have you tried using the simple mailto?

Something like the following should do the trick:


System.Diagnostics.Process.Start("mailto:simon@somewhere.com?subject=blah&body=Hello world!", "poutlook");

Not sure how to force an account though.

--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Star" wrote:

> 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
>

Re: How to launch Outlook with parameters by Star

Star
Sun Nov 25 15:28:37 PST 2007

Thanks, that works even better than my previous solution.

String cURL;
cURL="mailto:abbeyvet@outfront.net&Subject=Please%2C%20I%20insist%21&Body=test";

System.Diagnostics.Process.Start("IExplore",cURL);



Simon Hart [MVP] wrote:
> Have you tried using the simple mailto?
>
> Something like the following should do the trick:
>
>
> System.Diagnostics.Process.Start("mailto:simon@somewhere.com?subject=blah&body=Hello world!", "poutlook");
>
> Not sure how to force an account though.
>

Re: How to launch Outlook with parameters by Peter

Peter
Mon Nov 26 02:42:37 PST 2007

On Windows Mobile 5.0 and above you can use
Microsoft.WindowsMobile.PocketOutlook.MessagingApplication.DisplayComposeForm.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

"Star" <star@nospam.com> wrote in message
news:O$VSnr7LIHA.1184@TK2MSFTNGP04.phx.gbl...
> Thanks, that works even better than my previous solution.
>
> String cURL;
> cURL="mailto:abbeyvet@outfront.net&Subject=Please%2C%20I%20insist%21&Body=test";
>
> System.Diagnostics.Process.Start("IExplore",cURL);
>
>
>
> Simon Hart [MVP] wrote:
>> Have you tried using the simple mailto?
>>
>> Something like the following should do the trick:
>>
>>
>> System.Diagnostics.Process.Start("mailto:simon@somewhere.com?subject=blah&body=Hello
>> world!", "poutlook");
>>
>> Not sure how to force an account though.
>>