By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,512 Members | 3,847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,512 IT Pros & Developers. It's quick & easy.

Open Outlook using C#

P: n/a
C
Hi,

From my ASP.NET application when the user clicksa button I want to be able
to programmatically open Outlook, create a new mail, add attachments and set
the body text.

Is this possible?

C.

Oct 26 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Why would you want to open Outlook? You can do all of those things without
Outlook.

--
HTH,

Kevin Spencer
Microsoft MVP
Short Order Coder
http://unclechutney.blogspot.com

The devil is in the yada yada yada
"C" <C@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
Hi,

From my ASP.NET application when the user clicksa button I want to be able
to programmatically open Outlook, create a new mail, add attachments and
set
the body text.

Is this possible?

C.

Oct 26 '06 #2

P: n/a
C
So my user can then just select who they want to send it to.

I will add the attachments and text from my application.

The users to receive the email may not be part of the Organisation so I
cannot provide a lookup in the application.

"Kevin Spencer" wrote:
Why would you want to open Outlook? You can do all of those things without
Outlook.

--
HTH,

Kevin Spencer
Microsoft MVP
Short Order Coder
http://unclechutney.blogspot.com

The devil is in the yada yada yada
"C" <C@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
Hi,

From my ASP.NET application when the user clicksa button I want to be able
to programmatically open Outlook, create a new mail, add attachments and
set
the body text.

Is this possible?

C.


Oct 26 '06 #3

P: n/a
>Is this possible? <<

No.

C wrote:
Hi,

From my ASP.NET application when the user clicksa button I want to be able
to programmatically open Outlook, create a new mail, add attachments and set
the body text.

Is this possible?

C.
Oct 26 '06 #4

P: n/a
>The users to receive the email may not be part of the Organisation so I
cannot provide a lookup in the application. <<

Why can't you provide the user with a text box and have them comma
delimit the email addresses.

C wrote:
So my user can then just select who they want to send it to.

I will add the attachments and text from my application.

The users to receive the email may not be part of the Organisation so I
cannot provide a lookup in the application.

"Kevin Spencer" wrote:
Why would you want to open Outlook? You can do all of those things without
Outlook.

--
HTH,

Kevin Spencer
Microsoft MVP
Short Order Coder
http://unclechutney.blogspot.com

The devil is in the yada yada yada
"C" <C@discussions.microsoft.comwrote in message
news:52**********************************@microsof t.com...
Hi,
>
From my ASP.NET application when the user clicksa button I want to be able
to programmatically open Outlook, create a new mail, add attachments and
set
the body text.
>
Is this possible?
>
C.
>
Oct 26 '06 #5

P: n/a
It is possible, but may not be necessary. If it is necessary, the newsgroup
to ask would be:

microsoft.public.vsnet.vstools.office

--
HTH,

Kevin Spencer
Microsoft MVP
Short Order Coder
http://unclechutney.blogspot.com

The devil is in the yada yada yada
"xAvailx" <bj******@hotmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
>>Is this possible? <<

No.

C wrote:
>Hi,

From my ASP.NET application when the user clicksa button I want to be
able
to programmatically open Outlook, create a new mail, add attachments and
set
the body text.

Is this possible?

C.

Oct 27 '06 #6

P: n/a
"Kevin Spencer" <sp**@uce.govwrote in message
news:uz****************@TK2MSFTNGP04.phx.gbl...
It is possible, but may not be necessary. If it is necessary, the
newsgroup to ask would be:
As is fairly well known, Office Automation through ASP.NET is a really bad
thing to do in terms of performance.

Even Microsoft themselves strong advise against it...
http://support.microsoft.com/default...US;q257757#kb2
Oct 27 '06 #7

P: n/a
Oh yes, I advised against it also!

--
HTH,

Kevin Spencer
Microsoft MVP
Short Order Coder
http://unclechutney.blogspot.com

The devil is in the yada yada yada
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2********************@TK2MSFTNGP05.phx.gbl.. .
"Kevin Spencer" <sp**@uce.govwrote in message
news:uz****************@TK2MSFTNGP04.phx.gbl...
>It is possible, but may not be necessary. If it is necessary, the
newsgroup to ask would be:

As is fairly well known, Office Automation through ASP.NET is a really bad
thing to do in terms of performance.

Even Microsoft themselves strong advise against it...
http://support.microsoft.com/default...US;q257757#kb2

Oct 27 '06 #8

P: n/a
So, you are saying that I can go to an asp.net website, and asp.net can
open outlook on my client machine and "create a new mail, add
attachments and set the body text"?

Please enlighten me! (no cockiness intended)

Thx.

Kevin Spencer wrote:
It is possible, but may not be necessary. If it is necessary, the newsgroup
to ask would be:

microsoft.public.vsnet.vstools.office

--
HTH,

Kevin Spencer
Microsoft MVP
Short Order Coder
http://unclechutney.blogspot.com

The devil is in the yada yada yada
"xAvailx" <bj******@hotmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
>Is this possible? <<
No.

C wrote:
Hi,

From my ASP.NET application when the user clicksa button I want to be
able
to programmatically open Outlook, create a new mail, add attachments and
set
the body text.

Is this possible?

C.
Oct 27 '06 #9

P: n/a
"xAvailx" <bj******@hotmail.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
So, you are saying that I can go to an asp.net website, and asp.net can
open outlook on my client machine and "create a new mail, add
attachments and set the body text"?
No - what Kevin and I are saying is that there is no need whatever to open
Outlook on the client machine in order to send an email, as everything you
require (including attachments) is available through the .NET Framework,
specifically the System.Net.Mail namespace: http://www.systemnetmail.com

You must have seen webpages like this before:
http://www.markrae.com/contact/mail.aspx
Oct 27 '06 #10

P: n/a
>is that there is no need whatever to open Outlook on the client machine in order to send an email, <<

I am aware of that.

What the original poster was asking for was to "when the user clicksa
button I want to be able to programmatically open Outlook, create a
new mail, add attachments and set the body text. Is this possible?"

This was so the user can "then just select who they want to send it
to""

Which I replied to no, it is not possible.

Kevin's reply was "It is possible, but may not be necessary".

That is why I am asking how is it possible, because I don't know how...
(btw, I know about office automation, but that would only be possible
on the server end AFAIK).
Mark Rae wrote:
"xAvailx" <bj******@hotmail.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
So, you are saying that I can go to an asp.net website, and asp.net can
open outlook on my client machine and "create a new mail, add
attachments and set the body text"?

No - what Kevin and I are saying is that there is no need whatever to open
Outlook on the client machine in order to send an email, as everything you
require (including attachments) is available through the .NET Framework,
specifically the System.Net.Mail namespace: http://www.systemnetmail.com

You must have seen webpages like this before:
http://www.markrae.com/contact/mail.aspx
Oct 27 '06 #11

P: n/a
"xAvailx" <bj******@hotmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
That is why I am asking how is it possible, because I don't know how...
(btw, I know about office automation, but that would only be possible
on the server end AFAIK).
1) Assuming Outlook is the default mail client, the mailto HTML tag would
launch Outlook on the client. The mailto tag accepts various arguments
including subject, body etc...

2) Otherwise, client-side automation is possible though messy with an
ActiveX control (if all the clients use IE) or a Java applet...

I certainly can't recommend either approach...
Oct 27 '06 #12

P: n/a
>The mailto tag accepts various arguments including subject, body etc... <<

Right, but you can't do attachments.
>2) Otherwise, client-side automation is possible though messy with an ActiveX control (if all the clients use IE) or a Java applet... <<
Right, but this is no longer asp.net realm. You can do pretty much
anything with an ActiveX control.
>I certainly can't recommend either approach... <<
So we are on the same page. I just wanted to make sure I wasn't missing
something very obvious...

Thx.
Mark Rae wrote:
"xAvailx" <bj******@hotmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
That is why I am asking how is it possible, because I don't know how...
(btw, I know about office automation, but that would only be possible
on the server end AFAIK).

1) Assuming Outlook is the default mail client, the mailto HTML tag would
launch Outlook on the client. The mailto tag accepts various arguments
including subject, body etc...

2) Otherwise, client-side automation is possible though messy with an
ActiveX control (if all the clients use IE) or a Java applet...

I certainly can't recommend either approach...
Oct 27 '06 #13

P: n/a
"xAvailx" <bj******@hotmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>>The mailto tag accepts various arguments including subject, body etc...
<<

Right, but you can't do attachments.
Actually, you can apparently, under certain conditions...

http://www.google.co.uk/search?sourc...lto+attachment

I haven't tried it myself, but it looks like it would work...
Oct 27 '06 #14

P: n/a
>The mailto tag accepts various arguments including subject, body etc... <<

Right, but you can't do attachments.
>2) Otherwise, client-side automation is possible though messy with an ActiveX control (if all the clients use IE) or a Java applet... <<
Right, but this is no longer asp.net realm. You can do pretty much
anything with an ActiveX control.
>I certainly can't recommend either approach... <<
So we are on the same page. I just wanted to make sure I wasn't missing
something very obvious...

Thx.
Mark Rae wrote:
"xAvailx" <bj******@hotmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
That is why I am asking how is it possible, because I don't know how...
(btw, I know about office automation, but that would only be possible
on the server end AFAIK).

1) Assuming Outlook is the default mail client, the mailto HTML tag would
launch Outlook on the client. The mailto tag accepts various arguments
including subject, body etc...

2) Otherwise, client-side automation is possible though messy with an
ActiveX control (if all the clients use IE) or a Java applet...

I certainly can't recommend either approach...
Oct 27 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.