Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: Automating Bookmarks
Conf: (P-PDF) Developers, Msg: 82445
From: jwcollier
Date: 3/7/2003 06:47 AM

Hi, I'm new to the forum and using Acrobat IAC in VB:

I have a PDF with named bookmarks, but w/o "Destinations" that are set.

**I need to be able to search/find certain text on the page. When the text is found, I need to make sure the corresponding bookmark is there, and set the bookmark "Destination". I'm able to do everything automatically except setting the Destination..(i.e., in Acrobat, go to bookmark, right click, "Set Destination". Do I use the PDBookmark object to do this??


Private Sub FindAcrobatText()

Dim Exch As CAcroApp, AVDoc As CAcroAVDoc, AVPageView As CAcroAVPageView
Dim PDDoc As CAcroPDDoc, PDText As CAcroPDTextSelect, PDBookmark As CAcroPDBookmark

Set Exch = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")
Set PDDoc = CreateObject("AcroExch.PDDoc")

'Show exch window
AVDoc.Open "Q:\882346.pdf", ""

'Find text
AVDoc.FindText "Title of Project", False, False, True

'If found, so state
If (AVDoc.FindText("Title of Project", False, False, True)) = True Then
MsgBox ("Found Face Page")
Else: MsgBox ("No Face Page found")
End If

Set PDDoc = AVDoc.GetPDDoc
Set PDBookmark = CreateObject("AcroExch.PDBookmark")

'**See if "Face Page" Bookmark exists..
If (PDBookmark.GetByTitle(PDDoc, "Face Page") = True) Then
MsgBox ("Found Face Page Bkmk")
MsgBox ("Notify Jim/Tia--Bookmark Template Missing")
End If

''**??** Here's where I'm stuck?-
''How do I "Set the Bookmark to the Destination"??
''I've read about "Named Destinations" But still confused how to set!!

End Sub

Please, Any help is appreciated!


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.