Skip to main content
Participant
October 20, 2017
Answered

Get PDF page names (labels) using vba

  • October 20, 2017
  • 1 reply
  • 1679 views

Hello All,

I'm writing some vba code and I need to loop all the pages in a pdf file. I am able to get the name of the current page using  PDDoc.GetJSObject.GetPageLabel. I need to loop all the pages and get all their names. E.g.

For i = 0 to  PDDoc.getNumPages

     //code to read the page names

next i

Thank in advance,

Daniel.

This topic has been closed for replies.
Correct answer dannyboysk8s

It's me again. I figured it out. The .GetPageLabel accepts a parameter i.e. the loop counter i use to iterate the pages.

Thanks,

Daniel

1 reply

dannyboysk8sAuthorCorrect answer
Participant
October 20, 2017

It's me again. I figured it out. The .GetPageLabel accepts a parameter i.e. the loop counter i use to iterate the pages.

Thanks,

Daniel

Karl Heinz  Kremer
Community Expert
Community Expert
October 20, 2017

I was just about to say the same thing when I saw your reply come in. Even though you are programming in VB or VBA, you need to read the JavaScript API documentation so that you know what functions take what parameters. The documentation for the function in question is here:

Acrobat DC SDK Documentation