Trilight Zone Forum Index Trilight Zone
Privacy & Anonymity is our speciality !
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to invoke InfoPath 2003 form from C# application?

 
Post new topic   Reply to topic    Trilight Zone Forum Index -> Networking
Author Message
tricore
Guest





PostPosted: Mon Dec 11, 2006 6:58 am    Post subject: How to invoke InfoPath 2003 form from C# application? Reply with quote

- 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");
}
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Trilight Zone Forum Index -> Networking All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group