Export form to PDF -- parameter incorrect

M

mpenkov

Hi all,

I'm attempting to use the InfoPath form control to convert an InfoPath form
to PDF.

The conversion step is as follows:

public void DoConvert(string filename)
{
formControl1.XmlForm.CurrentView.Export(
filename,
ExportFormat.Pdf);
}

This previously worked fine with the MS Office 2007 Beta. I have since
installed the release of Office 2007, and now the code above throws a
System.ArgumentException. The message is: "InfoPath cannot export the form.
The parameter is incorrect".

Exports to other formats (ExportFormat.Xps and ExportFormat.Mht) also fail
with the same error message.

I'm compiling and running against the following DLLs:

Microsoft.Office.InfoPath.dll -- file version 12.0.4518.1014, assembly
version 12.0.0.0
Microsoft.Office.InfoPath.FormControl.dll -- file version 12.0.4518.1014,
assembly version 12.0.0.0

Does anyone have any ideas on what could be wrong?

Cheers,
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top