I am working on a windows application form using VB.net. This form has save button. On Onclick Method of Save button I am writing the output in Output.xml file and, I am launching InfoPath form. InfoPath form should open (Read only) with the Result of the windows application and user should be able to email it, Print it or Save the InfoPath form.
Here is my Idea:
I am adding the reference
Imports Microsoft.Office.Interop.InfoPath and
On Onclick event of save button I am writing this code
Dim objIP As Object
'Create a reference to the ExternalApplication object.
objIP = CreateObject("InfoPath.ExternalApplication")
'Create an InfoPath form from a form template.
objIP.NewFromSolution("C:\IP_Calculator_\bin\Debug\IP _Calculator_.xsn")
My IP_ Calculator_ is an InfoPath 2003 project which I have created in VS2005 using Vb.net. I am reading the Output.xml file in OnLoad event in this InfoPath project “IP_ Calculator_” and when this form opens data is pre populated.
But when I try to open the template using my windows application, it opens without data.
Is it possible with InfoPath?