Connecting Tech Pros Worldwide Help | Site Map

Open Default Email Client with Attachment

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 20th, 2006, 01:25 PM
Hanika
Guest
 
Posts: n/a
Default Open Default Email Client with Attachment

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, 04:25 AM
Cor Ligthert [MVP]
Guest
 
Posts: n/a
Default 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, 07:45 AM
Hanika
Guest
 
Posts: n/a
Default 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
>
>
>
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.