Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Losing PDF Field Value when saving from VBA


Level 1


I have a premade PDF form that was made with LiveCycle, and I am trying to upload data into it from an Excel Sheet.  I have got the code working to upload the data, and I fills the entire from when I have it open, so I know it works. However, I cannot get the form to Save without losing some of the data (specifically the data behind radio buttons or exclusion groups).  The problem seems to lie with this line of code:

objAcroPDDoc.Save 1, ThisWorkbook.Path & shMain.Cells(i, 155).Value & ".pdf"

It saves the pdf as the value in the cell like I want, but I lose the data. Is there a different line for saving an XFA pdf? I have also tried making a script to create then import an XML from Excel into the form and then save. I know this works when I do it manually and use "Save As" in Adobe Acrobat, but when I use VBA and the save command it still loses the exact same data. I have looked at other posts, but can't seem to isolate the issue.

I asked in the Acrobat forum and was told to try LiveCycle too. I have Adobe IX Pro and Excel 2007.

Any ideas?

1 Reply