Solved

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

Posted on 2014-09-11
6
3,353 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Suggested Courses

636 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