Link to home
Start Free TrialLog in
Avatar of fpoyavo
fpoyavoFlag for United States of America

asked on

Outlook with attachment

Hi Experts,

I have web form and need on button click open new outlook email message and attach file from local drive c:\my\some.txt

Thank you.
Avatar of diablocute
diablocute

Do you need to have outlook open a new message window showing the attachment

or

Sent a mail with that file as attachment
Avatar of fpoyavo

ASKER

Yes. I need to have outlook open a new message window showing the attachment
using mailto attribute will work if outlook is the user's default browser.

<SCRIPT language=javascript>
function MySub()
{document.mail.submit();}
</SCRIPT>

<BODY onload="MySub()">
<form name="mail" enctype="text/plain" method="get"
action=mailto:?subject=Document&attachment="c:\temp\file.txt">
</form>

--- from http://www.notestips.com/80256B3A007F2692/1/4CF1A694C1AAEC4780256D610013FEDE?OpenDocument ---


It didn't work for outlook 2003, sorry
Avatar of fpoyavo

ASKER

It does open email but cannot attach file.  I am looking for C# code not JavaScript.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of tomvergote
tomvergote
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial