Error getting ObjectAttribute array

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
Kiefer
Posts: 25
Joined: Mon Sep 30 2002

Error getting ObjectAttribute array

Post by Kiefer » Mon Nov 13 2006

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

jggori
Posts: 10
Joined: Wed Oct 18 2006
Contact:

Post by jggori » Wed Nov 22 2006

I set the Currentpage to n and that seemed to help, I'm in the same boat

Kiefer
Posts: 25
Joined: Mon Sep 30 2002

Set On Error Resume Next and it will work

Post by Kiefer » Wed Nov 22 2006

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. :)

Post Reply