

Set fields = xmlDoc.getElementsByTagName("field") Sub Access2PDF()ĭim fields As IXMLDOMNodeList, field As IXMLDOMNode Then, conditionally assign child value element by value of name attribute.

lectSingleNode("City").Text = ClientCityĬonsider looping on field nodes. lectSingleNode("NAME First Middle Last Suffix").Text = lectSingleNode("Birthday MMDDYYYY").Text = ClientDOB Set xmlRoot = xmlDoc.getElementsByTagName("fields").Item(0)ĬlientName = Me.FirstName.Value & " " & Me.MiddleName.Value & " " & PathToXML = "C:\Users\Owner\Documents\SSA827TestAgain.xfdf" Here is the code: Private Sub Command74_Click()ĭim ClientName As String, ClientSSN As String, ClientState As String,ĭim ClientAddress As String, ClientCity As String, pathToXML Asĭim xmlDoc As MSXML2.DOMDocument60, xmlRoot As MSXML2.IXMLDOMNodeĭim AcroApp As Acrobat.AcroApp, Oripdf As Acrobat.AcroAVDoc
Xml tools to load xfdf to spreadsheet pdf#
The goal is that the user is on the MS Form, clicks "create Docs" and is returned a series of nicely filled pdf forms. I want, however, for this to happen in VBA code. Using the VBA for the XML file works, and if I open up the target FoxIt form in FoxIt, go to the "Import from Date File" button and select the XML I just created in MS Access VBA, it will fill the form nicely. I have taken into account the minor differences in node names between the XML file and the XFDF file. On the other hand I have successfully create an XML file in this VBA code. Object variable or With block variable not set On the lectSingNode set attempt, I get an error 91: The VBA fails when I try to fill an xfdf file. I have worked with both XML files to house the data for the fill as well as XFDF file. I am creating a solution in VBA code in MS Access where I populate a PDF form from data on the MS form the user is on.
