Connecting Tech Pros Worldwide Help | Site Map

Open Default Email Client with Attachment

Hanika
Guest
 
Posts: n/a
#1: Sep 20 '06
Going on 3 days and I am wodnering if I am just not looking in the right
place. If anyone nows how to do this please please help me.

I am developing a Windows form application using VB.NET 2005. I have a PDF
file that I want to attach to the local default email client and display it
so that the user can enter the rest of the information. Like one would see
using the right-click Send To Mail Recipient.

I tried using MailTo. But the "Attach=" only works with Outlook.

Is there a way to access the Send To Mail Receipient via command line or
..NET apis?
Is there another way to do this??

THANKS!!!
Hanika
Cor Ligthert [MVP]
Guest
 
Posts: n/a
#2: Sep 22 '06

re: Open Default Email Client with Attachment


Hanika,

The answer is simple, adding an attachment programmatically is almost only
possible with using Office Outlook and than using the interop or Mapi to
that

A default mailclient has no attachment (as well not without dotNet)

This question is asked in the dotNet newsgroups probably 1001 times.

Cor

"Hanika" <Hanika@discussions.microsoft.comschreef in bericht
news:1A932570-1917-4710-AB4A-F9B00BC14B9B@microsoft.com...
Quote:
Going on 3 days and I am wodnering if I am just not looking in the right
place. If anyone nows how to do this please please help me.
>
I am developing a Windows form application using VB.NET 2005. I have a
PDF
file that I want to attach to the local default email client and display
it
so that the user can enter the rest of the information. Like one would
see
using the right-click Send To Mail Recipient.
>
I tried using MailTo. But the "Attach=" only works with Outlook.
>
Is there a way to access the Send To Mail Receipient via command line or
.NET apis?
Is there another way to do this??
>
THANKS!!!
Hanika

Hanika
Guest
 
Posts: n/a
#3: Sep 22 '06

re: Open Default Email Client with Attachment


Hello Cor,

Thanks for your message. You are correct, this question has been asked 1001
times but has been answered by few. I found a great sample in code proyect
that I used to do this. My application can open the default mail client with
an attachment. I have tested using the there main windows defaults: Outlook,
Outlook Express and hotmail. I had to use MAPI and interop.

Here is the link to the C# project I used in case anyone is interested:
https://secure.codeproject.com/cs/in...mapidotnet.asp

I converted to VB.NET.

Hanika

"Cor Ligthert [MVP]" wrote:
Quote:
Hanika,
>
The answer is simple, adding an attachment programmatically is almost only
possible with using Office Outlook and than using the interop or Mapi to
that
>
A default mailclient has no attachment (as well not without dotNet)
>
This question is asked in the dotNet newsgroups probably 1001 times.
>
Cor
>
"Hanika" <Hanika@discussions.microsoft.comschreef in bericht
news:1A932570-1917-4710-AB4A-F9B00BC14B9B@microsoft.com...
Quote:
Going on 3 days and I am wodnering if I am just not looking in the right
place. If anyone nows how to do this please please help me.

I am developing a Windows form application using VB.NET 2005. I have a
PDF
file that I want to attach to the local default email client and display
it
so that the user can enter the rest of the information. Like one would
see
using the right-click Send To Mail Recipient.

I tried using MailTo. But the "Attach=" only works with Outlook.

Is there a way to access the Send To Mail Receipient via command line or
.NET apis?
Is there another way to do this??

THANKS!!!
Hanika
>
>
>
Closed Thread