All:
Need help to auto-fill and auto-save PDFs using VBA or some other means.
I have created an XFA form using LiveCycle ES ( v8 ) with a few fields.
What I need to do is
- Open the blank PDF form
- Update 3 fields
- Save the PDF with a new name
My Excel VBA code so far ( ** Copied from another post ).
Sub rxOpenPDF_UpdateFields()
Dim pdfApp As Acrobat.AcroApp, pdfPDDoc As Acrobat.AcroPDDoc, jso As Object
Dim str1$, bolOpen As Boolean, strFile$
Set pdfApp = CreateObject("AcroExch.App")
Set pdfPDDoc = CreateObject("AcroExch.PDDoc")
bolOpen = pdfPDDoc.Open("C:\test.PDF")
Set jso = pdfPDDoc.GetJSObject
str1 = jso.getfield("Account_Name").Value
pdfApp.Exit
Set pdfApp = Nothing
Set pdfPDDoc = nothing
Set jso = Nothing
End Sub
Excel is exiting ( cannot recover ) on the pdfPDDoc.Open statement
Any help will be very appreciated
Aubrey
I am on Windows XP,
In VBA, I have created Tool References to [Adobe Acrobat 9.0 Type Library]
Downloaded the Acrobat v9 SDK but was lost trying to locate any help for simple VBA.