Error with browser enabled Infopath form RRS feed

  • Question

  • Hello,

    I have created a browser enabled Infopath form and used the below code to export the form to pdf. but i get two errors here

    1. ‘Export’ is not a member of "Microsoft.Office.Infopath.View'

    2. Name 'ExportFormat' is not declared.

    My code is: 

    Public Sub CTRL44_5_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)

                ' Write your code here."

                Dim fileName As String

                Dim nameNode As XPathNavigator

                nameNode = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:ProblemNumber", NamespaceManager)

                fileName = nameNode.Value + ".pdf"

                Me.CurrentView.Export("D:\Documents and Settings\manish sharma\Desktop\" + fileName, ExportFormat.Pdf)

            End Sub

    Please help.....

    • Changed type Clayton Cobb Tuesday, February 8, 2011 2:48 AM Always use the Question Type
    Monday, February 7, 2011 10:12 AM


  • Thanks Marcus.

    I'am worried as i do not see any other options to fix the issue :(  

    • Marked as answer by M.Sharma Tuesday, February 8, 2011 2:25 PM
    Monday, February 7, 2011 1:16 PM

All replies