T
Thea Schmidt
Hi!
I'm trying to export an Infopath-Form to PDF/XPS with Managed Code. I've
installed the Infopath 2007 - Addin
and was succesful this way:
infPath = @"C:\toexport.xml";
Microsoft.Office.Interop.InfoPath.Application InfApp = new
Microsoft.Office.Interop.InfoPath.Application();
XDocument InfXDoc = InfApp.XDocuments.Open(infPfad, (int)
XdDocumentVersionMode.xdCanOpenInReadOnlyMode);
InfXDoc.View.Export(@"C:\exported.pdf", "PDF");
InfXDoc.View.Export(@"C:\exported.xps", "XPS");
InfApp.Quit(true);
InfApp = null;
There ist only one fault: Infopath opens an application window and shows the
form. Does anybody knows a way to access the file without the window?
And can i select the view i want to export? Seems it always takes the
standard-view?
Thank You!
I'm trying to export an Infopath-Form to PDF/XPS with Managed Code. I've
installed the Infopath 2007 - Addin
and was succesful this way:
infPath = @"C:\toexport.xml";
Microsoft.Office.Interop.InfoPath.Application InfApp = new
Microsoft.Office.Interop.InfoPath.Application();
XDocument InfXDoc = InfApp.XDocuments.Open(infPfad, (int)
XdDocumentVersionMode.xdCanOpenInReadOnlyMode);
InfXDoc.View.Export(@"C:\exported.pdf", "PDF");
InfXDoc.View.Export(@"C:\exported.xps", "XPS");
InfApp.Quit(true);
InfApp = null;
There ist only one fault: Infopath opens an application window and shows the
form. Does anybody knows a way to access the file without the window?
And can i select the view i want to export? Seems it always takes the
standard-view?
Thank You!