With InfoPath 2007, the following line of code used to work fine when you use the Microsoft.Office.InfoPath.FormControl control in a C# Windows Form application.
formControl1.XmlForm.CurrentView.Export(path, Microsoft.Office.InfoPath.ExportFormat.Pdf);
When you try to use the same line of code in InfoPath 2010, you get the error message:
"InfoPath has encountered an error. The operation failed. InfoPath cannot export the form. No such interface supported"
Has anyone figured out a way around this error? Or has anyone figured out a new to export to PDF from this control?
I'd be glad to hear from anyone to see how you implement this functionality now that it does not work in 2010.