I have written a routine in a VS2005 C# Windows form application to print a group of InfoPath 2007 forms. It works, but it looks clumsy because the Infopath application window is being opened in a maximized state. Is there a way to hide or minimize the Infopath application window?
The following is an snipet of the code:
//
// Create an instance of the InfoPath Application
//
IP.ApplicationClass InfoPathApp =
new IP.ApplicationClass(); IP.XDocument myXdoc = InfoPathApp.XDocuments.NewFromSolution(sFormTemplate);
myXdoc.PrintOut();
object objDoc = InfoPathApp.XDocuments[0];
InfoPathApp.XDocuments.Close(objDoc);