Solved

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

Posted on 2014-09-11
6
2,749 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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…

763 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

11 Experts available now in Live!

Get 1:1 Help Now