I am writing a web form application in c# and I have this problem.
I would like to create a button in one page that once is pressed:
1)It opens outook
2)The attachment of the mail to send is the aspx page as a word document.
I have tried for two days but I still can’t find a solution!
I almost reached a solution with a script that first (using the Interop.World library) opens Word and create the doc from the html code, and after that runs a macro that opens outlook with the document in attachment… but it works only when I debug the application and it doesn’t once the page is published in my local intranet.
You can not do this.
You create your web app in ASP.NET / JSP /PHP, your website will be rendered as HTML to the client browser. It can not access applications in the client machine. If that was possible, People would have written websites where it will automatically open skype / outlook / drop box apps in the client computer and steal relevant data send to the author.
The only possiblity you can do something on the client computer is creating an Activex component and Let the user download it and give permissions to run. This is not compatable with all browsers. You may also look into the capabilities of Silver light run time to see what it can do on the client side ( very minimal).
Summary : Do not plan any features which does something on the client computer. It is nearly not possible.
What you can think about is some other libraries which creates some document (PDF ? ) from your data and send an email using the standard email sending procedure in dot net (SmtpClient class).