How to use the getannots method?
Hi,
I'm trying to read the annotations of a pdf file
Sub ReadAnnotationsTest()
Dim AcrApp As Acrobat.Acroapp
Dim AcrAvDoc As Acrobat.AcroAVDoc
Dim pdDoc As Acrobat.CAcroPDDoc
Dim Jso As Object
Dim Annots() As Variant
Dim Annot As Object
Dim Props As Object
Dim strContent, strSubType, strAuthor, strSubject As String
Set AcrApp = New Acrobat.Acroapp
Set AcrAvDoc = AcrApp.GetActiveDoc
Set pdDoc = AcrAvDoc.GetPDDoc
Set Jso = pdDoc.GetJSObject
Jso.syncAnnotScan
Set Annots() = Jso.getannots ‘ HERE I GET THE ERROR "impossible to assign to the matrix" and the procedure blocks
For Each Annot In Annots
Set Props = Annot.getprops
strAuthor = Props.Author
strSubject = Props.Subject
strContent = Props.contents
strSubType = Props.Type
Call WriteTable(strAuthor, strSubject, strContent, strSubType) ' this is an external routine
Next
Set Props = Nothing
Set Annot = Nothing
Set Annots = Nothing
Set Jso = Nothing
Set pdDoc = Nothing
Set AcrAvDoc = Nothing
Set AcrApp = Nothing
End Sub
There is anything wrong in the declaration of Annots on the usage of the getannots method ?
Thanks,
Michele.
