Hello Friends,
I have problem while Open New pdf which is created by code
I am Using XP Operating System and I am using following VB code for creating file. I have insert data in text fields of the PDF by this Code
Code: Select all
Dim bResult As Boolean
Dim objarray As Variant
bResult = PDF1.OpenEx("E:\f4868.pdf", "")
If (bResult = False) Then
MsgBox "Can not open PDF Document"
End If
PDF1.ReportState = acReportStateDesign
objarray = PDF1.ObjectAttribute("Pages[1]", "Objects")
For Each obj In objarray
If obj.Attribute("ObjectType") = 6 Then
obj.Attribute("TextColor") = vbRed
obj.Attribute("Value") = obj.Attribute("Name")
End If
Next
PDF1.Save "e:\test.pdf", acFileSaveAll
But when I open test.pdf then it gives me error.
And error is.
"There was an error opening this document. There was problem reading this document (14)"
So Please Help ASAP for Why I am getting this error.
Kamlesh Gujarathi
Kamlesh@itshastra.com