Previous | Next | (P-PDF) Developers
Topic: Re: Automating Bookmarks
Conf: (P-PDF) Developers, Msg: 95512
From: jiana
Date: 8/29/2003 11:47 PM
Someone on this site came up with a solution to this and asked me to post it for him. This solution automates the creation of bookmarks in Adobe Acrobat using VB
Dim PDBookmark As CAcroPDBookmark
'Create the Acrobat Object
Set acroApp = CreateObject("AcroExch.App", "")
'Show the Application
acroApp.Show
'Create Doc objects
Set PDYourDoc = CreateObject("AcroExch.PDDoc", "")
Set AVYourDoc = CreateObject("AcroExch.AVDoc", "")
'code to load your doc doc
bFileOpen4 = AVYourDoc.Open("path to your doc", "Window Title")
Set PDYourDoc = AVYourDoc.GetPDDoc
'Create BookMark Object
Set PDBookmark = CreateObject("AcroExch.PDBookmark", "")
'activate the app
acroApp.Show
'execute the menu item
acroApp.MenuItemExecute ("NewBookmark")
'set bookmark title
btitle = PDBookmark.GetByTitle(PDYourDoc, "Untitled")
btitle = PDBookmark.SetTitle("bookmarktitle")