Solved

In Microsoft Access 2010, using VBA, open a pdf and import fields?

Posted on 2014-09-11
6
2,880 Views
Last Modified: 2014-09-21
I have fillable pdf forms, developed in LiveCycle, that I would like to import to my MS Access 2010 database.  I have all of the pdf field names and the table is set up in Access.  Could someone please provide some guidance?  Thank you.
0
Comment
Question by:Yeggster
  • 2
  • 2
6 Comments
 
LVL 12

Assisted Solution

by:danishani
danishani earned 500 total points
ID: 40317718
You might try to look into this link as possible start.
If you combine this with your Recordset that should do the trick.

Reading Form Fields with VBA

Hope this helps,
Daniel
0
 
LVL 84
ID: 40317856
To be clear: You cannot do this with VBA alone. You must use a 3rd party library, like the Adobe Acrobat SDK/API. The link from Daniel above is using the Adobe library, and in order to use that you'd need to have the full version of Adobe installed on your machine, and on any machine where your application will be running.
0
 

Accepted Solution

by:
Yeggster earned 0 total points
ID: 40326518
Here is how I solved the problem.

The code below is run when the user clicks the "import" button.  The dynamic pdf (created Adobe LiveCycle Designer ES2) in has two fields, labeled "c" and "TextField2."  I changed TextField1 to "c" to make sure I was working with the correct naming convention.

Obviously this is two simple text fields being imported as strings.  I have not tried check boxes or anything else at this time.

Elliott

    
Private Sub Command0_Click()

    Dim AcroApp As New AcroApp
    
    Dim theform As New AcroPDDoc
    
    Dim jso As Object
    
    Dim text1 As String

    theform.Open ("C:\acrobatimporttest.pdf")
    
    Set jso = theform.GetJSObject
    
    text1 = jso.getField("a.b.c").Value
    text2 = jso.getField("a.b.TextField2").Value
    
    MsgBox (text1)
    MsgBox (text2)

End Sub

Open in new window

0
 

Author Comment

by:Yeggster
ID: 40326774
I've requested that this question be closed as follows:

Accepted answer: 0 points for Yeggster's comment #a40326518

for the following reason:

I'm not sure what I am supposed to put here but the code works with MS Access 2010 and the imported fields are text fields from a dynamic pdf created in Adobe LiveCycle Designer ES2.
0
 
LVL 84
ID: 40326775
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now