473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Use VBA to pull data from text box in XFA form

Hello,

I am trying to do something relatively simple but as usual I am doing it using a new medium and have no idea what syntax I need to use.

I have an XFA Form (a PDF created using Live Cycle Designer) which has several text boxes in it. I need to reference a specific text box (in this case "textbox14" - I didn't make the form so the text boxes don't have meaningful names) and pull the text that is entered in it. I will then use that text when saving the PDF so that the file name will contain the data from "textbox14".

I found a great resource with code samples on line for doing this with regular PDF's and the below code works fine to pull the data from a text box named "test1".

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command0_Click()
  2.     Dim AcroApp As Acrobat.CAcroApp
  3.     Dim theForm As Acrobat.CAcroPDDoc
  4.     Dim jso As Object
  5.     Dim test As String
  6.  
  7.     Set AcroApp = CreateObject("AcroExch.App")
  8.     Set theForm = CreateObject("AcroExch.PDDoc")
  9.     theForm.Open ("C:\Documents and Settings\joseph.korn\Desktop\testPDF.pdf")
  10.     Set jso = theForm.GetJSObject
  11.  
  12.  
  13.  
  14.     test = jso.getfield("test1").Value
  15.  
  16.     MsgBox test
  17.  
  18.  
  19.     theForm.Close
  20.  
  21.     AcroApp.Exit
  22.     Set AcroApp = Nothing
  23.     Set theForm = Nothing
  24.  
  25.     MsgBox "Done"
  26.  
However I need to do the same thing with a PDF made using Live Cycle Designer and the resource I found mentions that PDF's created using 'Designer' require the use of the XFA DOM. I have been trying to figure this out using some HUGE PDF's released by Adobe but I'm not a developer / programmer by trade and would appreciate any help in figuring this out.

Thanks!

RugbyKorn
Mar 27 '13 #1
0 1269

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: cvillard | last post by:
I am new to SQL, as old as it is. I am not new to programming I normally just use Access. I have two tables for a little project manager I made. After updates I sent an email to the user. I need...
1
by: Alex Wisnoski | last post by:
Access 97SR2-I am trying to create a Job Position data entry form based on a table. The form has 15 fields on it. I want to use a combo box to look in the table and see if the position number...
1
by: Alex.Wisnoski | last post by:
I have a data entry form with a combo box to look up an entrant's name. If the name is already in the table then it pulls up the record and that part of the form works fine. If the name isn't in...
2
by: Jeremy Dillinger | last post by:
I have a program setup to pull data from a database. My database table has things such as (category, Item, price, etc.) In my program I want to have multiple list boxes that will have a pull down...
3
by: jjgardner3.web | last post by:
Hello I have a very simple xml file: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="./status.xsl"?> <IEC> <Workstation> <Hostname>HOSTNAME</Hostname>...
3
by: Peter Newman | last post by:
i have used the data wizard form to create a data form with a datagrid on it. What i want to do is add a new coloum and put a Button in it. can anyboody showm me how to do this .... I will need...
0
by: napstar | last post by:
I have an excel file with data.I want to pull data from the excel file into a table in access.The data in excel has products and customers who buy these products and sometimes 1 customer can buy many...
6
by: kthequeen | last post by:
Is it possible to pull data( text contents and the file attribues, like filename ) from a pdf file and store in sql? ..using c# I have web app with 100+ pdf files that I need keyword search...
2
by: rush81 | last post by:
Hello All, I want to pull data against two fields from table. The combination of these fields give unique result like '123 VA' or '0123 VA' One field has entries like 0123 and 123, one entry with...
2
by: puT3 | last post by:
Hi, anyone can help me? My problem is data from Form of Asp does not appear in access database when i open the database. Why does this happen? My table name:Cuba ID PK Nama Umur
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.