I was unsuccessful in completing your code... I was able to set the jsoObject but the 'CountAllBookmarks' did not load. Do I need to load a javascript library?
Dim gApp As Acrobat.CAcroApp
Dim gPDDoc As Acrobat.CAcroPDDoc
Dim jso As Object
Sub Button1_Click()
Set gApp = CreateObject("AcroExch.App")
Set gPDDoc = CreateObject("AcroExch.PDDoc")
If gPDDoc.Open("C:\bookmarks.pdf") Then
Set jso = gPDDoc.GetJSObject ' <-- Works
MsgBox (jso.CountAllBookmarks()) '<-- Error: 438 - Object does not support this property or method
End If
End Sub