Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-09-11
6
Medium Priority
?
3,630 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 2000 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 85
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 85
ID: 40326775
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

886 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