Skip to main content
Apr 5, 2017 7:33 PM UTC
Answered

createChild action doesnt not work in browser

bkmChildsParent.createChild currentDepartment, "this.pageNum=" & dPageNum, dCount

This code creates a bookmark with the associated javascript action. I didn't realize that these javascript actions don't seem to be working when the PDF is opened in a browser. Is there a way to get the browser to work with a javascript action, or is there a way to add a non javascript action to these bookmarks within vba?

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer
Apr 7, 2017 6:17 PM UTC

I ended up having to create bookmarks via menu actions. If u are able to stick with javascript actions then createChild will work. If not use the code below to create your bookmarks.

gApp.MenuItemExecute ("NewBookmark")

newTitle = newBookmark.GetByTitle(PDDoc, "Untitled")

newTitle = newBookmark.SetTitle("Title")

5 replies

Correct answer
Apr 7, 2017 6:17 PM UTC

I ended up having to create bookmarks via menu actions. If u are able to stick with javascript actions then createChild will work. If not use the code below to create your bookmarks.

gApp.MenuItemExecute ("NewBookmark")

newTitle = newBookmark.GetByTitle(PDDoc, "Untitled")

newTitle = newBookmark.SetTitle("Title")

Translate
Legend
Apr 5, 2017 7:44 PM UTC

What browser?

Translate
lrosenth
Adobe Employee
Adobe Employee
Apr 5, 2017 8:41 PM UTC

And does it have the Acrobat plugin inside or is it using some 3rd party PDF viewer?

Translate
Apr 7, 2017 4:25 PM UTC

I tested in both Firefox and Chrome. As you pointed out it was the built in viewers of these two browsers that was opening the pdf. Since the pdf I am generated will be public and I can't control what viewer they use is there a way to get these bookmarks to work within the 3rd party viewers. I know that when I create bookmarks manually (CTRL+B) from within Acrobat it works, but not using the javascript action from vba.

Translate