Solved

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

Posted on 2014-09-11
6
3,014 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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