?
Solved

MS ACCESS 2007/adobe acrobat

Posted on 2013-01-29
4
Medium Priority
?
521 Views
Last Modified: 2013-02-15
How do I save a pdf file that has bookmarks into a pdf file with no bookmarks? I would like to write a routine in VBA.
0
Comment
Question by:centralmike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 85
ID: 38833138
VBA has no way to interact directly with Adobe. You can use the Adobe SDK, or a third party utility to work with a PDF, but that's about it.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 38833792
Actually Adobe Acrobat has an API for VBA - the IAC or Interapplication Communication Interface. You do need the full version of Acrobat to use most of the features. Which version of Acrobat do you have? With that information I can provide some sample code that would remove the bookmarks from a document.
0
 

Author Comment

by:centralmike
ID: 38833807
I have adobe 9 pro
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 2000 total points
ID: 38835234
The following code is a button handler that loads a PDF file, removes the bookmarks and then saves the modified file:

Private Sub CommandButton1_Click()
    Dim AcroApp As Acrobat.CAcroApp
    
    Dim theDocument As Acrobat.CAcroPDDoc
    Dim bm As Acrobat.AcroPDBookmark
    
    Dim thePath As String
    
    thePath = "C:\Users\Karl Heinz Kremer\Desktop\bookmark.pdf"
        
    Set AcroApp = CreateObject("AcroExch.App")
    Set theDocument = CreateObject("AcroExch.PDDoc")
     
    theDocument.Open (thePath)
    
    Set bm = CreateObject("AcroExch.PDBookmark")
    
    If bm.GetByTitle(theDocument, "") Then
        MsgBox ("Found Bookmark")
        bm.Destroy
        If theDocument.Save(PDSaveIncremental, "") = False Then
            MsgBox ("Cannot save the modiifed file")
        End If
    End If
    
    theDocument.Close
     
    AcroApp.Exit
    Set AcroApp = Nothing
    Set theDocument = Nothing
    Set bm = Nothing
     
    MsgBox "Done"
End Sub

Open in new window


To learn more about the IAC interface, you need to review the relevant documents in the Acrobat SDK:

http://www.adobe.com/devnet/acrobat/overview.html

http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?href=JS_Dev_Overview.71.1.html&accessible=true
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question