Skip to main content
riccardom15921476
Participant
March 6, 2019
Question

Error trying to set parameters in GetAnnots() from Excel VBA

  • March 6, 2019
  • 1 reply
  • 1859 views

Hi,

I am trying to export annotations from a pdf to excel using a macro.

The code is working except for the fact that if I try to assign parameters to GetAnnots() I receive an error message saying "Named argument not found".

If I don't assign any parameter to GetAnnots the code works but the comments are not in order by page.

This is the code i wrote for the javascript object:

''Access JSO object

Dim JSO As Object

Set JSO = AcroPDDoc.GetJSObject

JSO.console.Show ''show javascript console

''get total number of annotations

JSO.syncAnnotScan

''get list of annotations in document

Dim Annotations() As Object

Annotations = JSO.GetAnnots(nSortBy:=ANSB_Page, bReverse:=True)

Did anybody have the same issue?

Thanks

This topic has been closed for replies.

1 reply

erinferinferinf
Adobe Employee
Adobe Employee
March 6, 2019

Hi @riccardom15921476 ,

This particular forum is for plugins and extensions hosted on the Adobe Exchange. Are you making a plugin of some sort?

Is this an Acrobat question? If so, the forum moderators might consider moving this post to Acrobat Scripting or the Acrobat SDK area.

Regardless, here's an older thread about GetAnnots() that might be helpful.

Hope this is helpful!

riccardom15921476
Participant
March 6, 2019

Hi Erin,

Thanks for your reply. No it is not a plugin, it is just an excel macro. Sorry I didn't know this area was only for plugins, I will try to post it on the groups you suggested. Unfortunately the previous post doesn't answer my question but thanks anyway for the tip!