Hi, I'm testing a in-form javascript code to output an Infopath View to HTML Outlook email via a button on the form.
There is already the built in function - Send as Email - which can be initiated by an end user.
I proceeded with this because I wanted to utilise the component methods in other in-house work tools e.g. saving as an MHT file or printing to PDF for file storage.
Our office uses IP2003 primarily and it's worked pretty well so far.
I've now tried with IP2007 and Windows 7 at home and had to tweak a few things.
I found I had to lower the activex security and get a domain error when a save to the user's temp folder occurs.
But at work in our normal domain and using IP2003 I don't get any errors at all.
The temp folder is used to save rich text field images so they can be attached and linked properly in the Outlook email.
So two things.
1. I'm sharing this for other people to maybe find useful
2. I want to try and refine it and eliminate any bugs and implement any suggestions other IP developers might have.
So please give the attached template a go on your own system and see if it generates the View correctly for you. Then you may find a use the methods yourself, or you can help out with some feedback.
As far as I can find, this method has never been produced before but could potentially be very useful.
It contains some examples too of how to manipulate form properties and reference the files within the form template and cache.
I've attached the template as an IP2003 compatible template.