tricore Guest
|
Posted: Mon Dec 11, 2006 6:58 am Post subject: How to invoke InfoPath 2003 form from C# application? |
|
|
- Add a reference to “Microsoft InfoPath 1.0 Type Library”
- Refer the following code snippet for invoking the form:
using Microsoft.Office.Interop.InfoPath;
public Microsoft.Office.Interop.InfoPath.Application app;
public Microsoft.Office.Interop.InfoPath.XDocument doc;
//Add a button to the form and on button click event write the
//following code snippet
private void button1_Click(object sender, System.EventArgs e)
{
app = new Microsoft.Office.Interop.InfoPath.ApplicationClass();
doc = app.XDocuments.NewFromSolution("C:\\Temp.xsn");
} |
|