Connecting Tech Pros Worldwide Help | Site Map

Open Default Email Client with Attachment

  #1  
Old September 20th, 2006, 02:25 PM
Hanika
Guest
 
Posts: n/a
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
  #2  
Old September 22nd, 2006, 05:25 AM
Cor Ligthert [MVP]
Guest
 
Posts: n/a

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

  #3  
Old September 22nd, 2006, 08:45 AM
Hanika
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening email client and adding attachment... johnb41 answers 0 November 21st, 2005 11:44 PM
Launch default e-mail client with attachment Kurt answers 6 November 20th, 2005 05:21 PM
Launch default e-mail client with attachment Kurt answers 6 November 20th, 2005 04:52 PM
Open default e-mail client with attachments. Gama Franco answers 3 November 16th, 2005 10:39 PM