New Forum | Previous | Next | (P-PDF) Developers
Topic: IA Step Through all fields in a form
Conf: (P-PDF) Developers, Msg: 120980
Date: 10/27/2004 04:16 AM
OLE Automation, SDK. VB code modified to work in VFP. I can get the current value of a field using:
sFieldName = "AGENCY.NAME"
sFileName = "C:\test\test.pdf"
AcroExchApp = CREATEOBJECT("AcroExch.App")
AcroExchAVDoc = CreateObject("AcroExch.AVDoc")
AcroForm = CreateObject("AFormAut.App")
AcroFields = AcroForm.Fields
*--Get the field AGENCY.NAME value:
AcroField = AcroFields.Item(sFieldName)
*--Display the field AGENCY.NAME value in a messagebox
=MESSAGEBOX("field value is:"+Acrofield.value)
*--Change the value of AGENCY.NAME formfield:
Acrofield.value = "new value"
All of that works fine. However, I want to step through all of the fields and retrieve their field name and values. Is there an itemlist or a item count or a field count or an array of all fields or something?
I want to do something like:
For i = 1 TO acrofields.fieldcount
cfieldname = acrofields.getfieldname(i)
cField = AcroFields.Item(cFieldName)
cvalue = cField.value
Is there anyway to do that?