none
InfoPath 2010 view no longer exporting as a PDF RRS feed

  • Question

  • We have an application we wrote in Visual Studio 2008 that uses the InfoPath 2007 FormControl embedded in a Winform.  This application allows our users to fill out forms and export a view on those forms to a PDF.  This is done through the FormControl object using this line of code:

    IPFormControl.XmlForm.CurrentView.Export(

    @"C:\data\MyFile.pdf", Microsoft.Office.InfoPath.ExportFormat.Pdf );

    However, upon upgrading to the InfoPath 2010 FormControl, this line of code now yields this error:

    "InfoPath has encountered an error. The operation failed. InfoPath cannot export the form. No such interface supported"

    Has this functionality been removed in InfoPath 2010?  Is there some add-on that I need to install?  Any help with this would be much appreciated.

    Friday, April 8, 2011 3:09 PM

Answers

  • Hi Matthew,

    Finally, I found that it is a known issue from the Microsoft internal bug check system and the product group is trying to fix it.

    Appreciate for your patience and thank you for your understanding.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Bruce Song Thursday, April 21, 2011 5:51 AM
    • Marked as answer by Matthew Carnahan Thursday, April 21, 2011 1:23 PM
    Thursday, April 14, 2011 9:27 AM

All replies

  • Hi Matthew,

    Thank you for posting.

    I have reproduced the problem in InfoPath 2010 but I haven't found the workaround. I will do further research about your problem. There might be some delay to response you.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 11, 2011 10:26 AM
  • Hi Bruce,

    Thank you for your response and for your help researching this problem for me.  Please let me know if I can provide you with any additional information.  I look forward to your response.

    Matthew

    Monday, April 11, 2011 1:05 PM
  • Hi Matthew,

    Finally, I found that it is a known issue from the Microsoft internal bug check system and the product group is trying to fix it.

    Appreciate for your patience and thank you for your understanding.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Bruce Song Thursday, April 21, 2011 5:51 AM
    • Marked as answer by Matthew Carnahan Thursday, April 21, 2011 1:23 PM
    Thursday, April 14, 2011 9:27 AM
  • Hi Bruce,

    Thanks very much for looking into this and getting back to me.  Glad to hear Microsoft is aware and working on it.  Any ETA on a fix?

    Matthew

    Thursday, April 14, 2011 2:22 PM
  • Hi Matthew,

    From the description and the status of the issue in the internal bug sytem, this may be released in the sp1. However, I haven't got when will this will be released. I will let you know as soon as it releases for downloading.

    Best Regards, 


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 18, 2011 10:56 AM
  • Did anyone find I fix. I really need to make this happen for the form I made to work in Spiceworks. Right now it attaches as code when submited if it were a pdf a believe it may be treated as an attachment. Also can you guys post the code? I have some coe but am getting errors.

     

    Dim fileName As String

     

    Dim nameNode As XPathNavigator

     

    'Set the values. Replace "/my:myFields/my:textField" with the xpath to the field that has the value you want as the file name

    nameNode = MainDataSource.CreateNavigator().SelectSingleNode(

    "/my:myFields/my:textField", NamespaceManager)

    fileName = nameNode.Value +

    ".pdf"

     

    'Do the work -- notice we use the variable fileName as part of the path for the file

     

    Me.CurrentView.Export("C:\" + fileName, ExportFormat.Pdf)

    Error 1 'Export' is not a member of 'Microsoft.Office.InfoPath.View'. \\vienna\data\users\klucchesi\InfoPath Projects\newUserRequestForm2\FormCode.vb 38 13 newUserRequestForm

    Error 2 Name 'ExportFormat' is not declared. \\vienna\data\users\klucchesi\InfoPath Projects\newUserRequestForm2\FormCode.vb 38 53 newUserRequestForm

    Thursday, May 26, 2011 2:07 PM
  • Hi O24kristin,

    It would be better if you open up a new thread for the new question. In this way, our discussion here will not deviate too much from the
    original issue. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.

    Best Regards,




    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 27, 2011 8:13 AM
  • Hi Bruce,

    I am in the same situation as Matthew and eagerly await a fix/workaround. Is there a site where this bug can be tracked so we can be notified when a fix/workaround is available?

    Thursday, June 2, 2011 12:38 AM
  • Hi Robert,

    It is a internal bug system and does not open to the outside. So, it can't be tracked from outside. But from the description, it might be released in SP1 and we will still wait for some time:

    http://news.softpedia.com/news/Download-Office-2010-SP1-RTM-at-the-End-of-June-2011-200626.shtml

    http://www.winrumors.com/microsoft-office-2010-sp1-beta-released-to-testers/

    Hope this helps.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 2, 2011 6:29 AM
  • Hi Bruce,

    Well, SP1 was released today.  Unfortunately, it does not seem to have solved this problem.  I don't suppose there is any news on when a later hotfix might come out for this?

    Thanks very much,

    Matthew

    Tuesday, June 28, 2011 8:32 PM
  • Hi Mattenw,

    I am consulting the engineers about this. Thank you for  your understanding.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 29, 2011 9:00 AM
  • Hi Bruce,

    I was just wondering if you were able to get any additional info about a possible hotfix or other solutions?

    Thanks for your help!

    Wednesday, July 27, 2011 5:14 PM
  • Bruce,

    Sorry to pester you about this, just wondering if there is any update on a possible hotfix?

    Thursday, September 8, 2011 6:03 AM
  • Dear Moderator,

    Any updae for this. Actually I also need to export the view as pdf as we did in MOSS2007.


    http://www.abdulazizfarooqi.wordpress.com Abdul Aziz Farooqi [BizTalk & SharePoint Consultant] MCPD Web & MCPD SharePoint 2010


    Tuesday, August 6, 2013 5:20 AM
  • I too would LOVE an answer for this...

    Ian Yates Technical Manager Medical IT Pty Ltd PO Box 501, Carina QLD 4152 Australia Web: www.medicalit.com.au

    Thursday, August 15, 2013 12:53 AM
  • I would love to see a fix too.  But after 2 years since the original bug was reported, MS doesn't seem to care that this functionality is used or needed.  


    Friday, September 13, 2013 10:07 PM
  • Hi,

    I am able to export the Infopath form control ( .xml - Office 2007 Version ) as a PDF/XPS format, using the below code successfully. (using Vistual Studio - 2012 )

     formControl1.XmlForm.CurrentView.Export(@"C:\Templates\Form1.pdf", InfoPath.ExportFormat.Pdf);

    The above code is not working, when i design the template in Infopath ( office 2010/ 2103 Version ) and try to export the .xml as a PDF/XPS. 

    I came to know that it is a internal bug from Microsoft, and it will be provided as a fix. Is there any solution provided

    from Microsoft ? Or any other alternates provided for this 'Export' function ?

    Please let me any kind of solution/approaches for this problem. Thank you.

    ( Note: Used Microsoft Add-in plug-in ( SaveAsPDFandXPS.exe ) already, but it doesn't provide the needful. I want to do it through like the above code snippet)


    Tuesday, March 17, 2015 7:43 AM