I am trying to iterate through several files and look at their attributes. I can load the first file and see the attributes fine, but when I get to the second file, when I try to load the ObjectAttribute array, I get:
This array is fixed or temporarily locked
for the Object array. Suggestions?
Sample code:
.PDFTest.SetLicenseKey "Suite Evaluation Developer Pro", EvalCode
If .PDFTest.Open(strSource, "") = False Then
msgbox "Error opening PDF File: " & strSource
Else
.PDFTest.ReportState = acReportStateDesign
For n = 1 To PDFTest.PageCount
ObjArray = PDFTest.ObjectAttribute("Pages[" & n & "]", "Objects")
For Each Obj In ObjArray
If Obj.Attribute("Name") <> "" Then
Debug.Print Obj.Attribute("Name")
End If
Next
Next n
Error getting ObjectAttribute array
Set On Error Resume Next and it will work
The error is actually a spurious error, and can be ignored. If you set
On Error Resume Next
or similar syntax, it will work fine. :)
On Error Resume Next
or similar syntax, it will work fine. :)