Hi. Can someone put up an example of Opening an existing PDF document (Created in Adobe Acrobat), Filling in a form field called txtField1, and then saving the document?
I am currently evaluating the software and need this kind of functionality.
Thank You!
Can someone post an example of Opening, editing and saving?
-
- Posts: 8
- Joined: Tue Jan 20 2004
Hello,
Please find here a sample code on selecting a Field and changing its value at run mode.
Private Sub cmdDeleteObject_Click()
Dim obj As Variant
Dim objarray As Variant
'New for version 1.50
PDF1.SetLicenseKey LicenseTo, ActivationCode
PDF1.Open "c:\temp\test.pdf", ""
'Put report into RunState
'PDF1.ReportState = acReportStateRun
'get an array of all objects in Page[1]
objarray = PDF1.ObjectAttribute("Pages[1]", "Objects")
'Find and edit an object named "txtField1"
For Each obj In objarray
If obj.Attribute("Name") = "txtField1" Then
obj.Attribute ("Value") = "New Value"
'This fucntion enables the changes
PDF1.DoCommandTool (acCommandToolRunDocument)
End If
Next
'Save file
PDF1.Save "c:\temp\NewTest.pdf", 0
End Sub
Hope this helps.
Please find here a sample code on selecting a Field and changing its value at run mode.
Private Sub cmdDeleteObject_Click()
Dim obj As Variant
Dim objarray As Variant
'New for version 1.50
PDF1.SetLicenseKey LicenseTo, ActivationCode
PDF1.Open "c:\temp\test.pdf", ""
'Put report into RunState
'PDF1.ReportState = acReportStateRun
'get an array of all objects in Page[1]
objarray = PDF1.ObjectAttribute("Pages[1]", "Objects")
'Find and edit an object named "txtField1"
For Each obj In objarray
If obj.Attribute("Name") = "txtField1" Then
obj.Attribute ("Value") = "New Value"
'This fucntion enables the changes
PDF1.DoCommandTool (acCommandToolRunDocument)
End If
Next
'Save file
PDF1.Save "c:\temp\NewTest.pdf", 0
End Sub
Hope this helps.
-
- Posts: 8
- Joined: Tue Jan 20 2004
Thank You.
This works great. Sorry to be such a newbie!!