Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using Access to assign Bookmarks in a PDF Report

Posted on 2013-11-23
8
Medium Priority
?
1,580 Views
Last Modified: 2013-12-04
I have a report that I use to generate pdf checklists and I'd like to assign bookmarks to easily go to the appropriate checklist

there is a unique header at the beginning of each checklist.

Is there a simple way to do this in the Access vba process that generates the report

A web search bore no fruit

Thanks
0
Comment
Question by:rogerdjr
[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
  • 4
  • 2
8 Comments
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1500 total points
ID: 39671818
In general, you need to use a 3rd party method to work with a PDF file to that level. If you have the necessary Adobe components, you can use their SDK, or there a a utilities out there you can automate from Access to do this.
0
 

Author Comment

by:rogerdjr
ID: 39684408
Well it was worth a try thanks
0
 
LVL 85
ID: 39684929
So why the C grade, without any request for additional information? I gave you a few options and would be glad to help you explore them further. Or you can just Delete the question instead of awarding the lowest possible grade you can give ...
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Assisted Solution

by:rogerdjr
rogerdjr earned 0 total points
ID: 39685416
I went on line and found this solution -


I went on line and found this solution - I was hoping for a bit more of a solution from the Experts Exchange, but your was the only response and I got an email from the administrator that my "question needed attention" - what grade should I have given?

http://answers.microsoft.com/en-us/office/forum/office_2003-access/include-a-bookmark-in-an-access-report-so-pdf-will/7f8d45a8-503a-476a-b43d-c4aa4cbd5e67

Function AddBookmarks(strPDFPath As String, blnIncludeCoverTOC As Boolean) As Boolean
     Dim gApp As Object
     Dim gPDDoc As Object
     Dim jso As Object
     Dim BMR As Object
     Dim intWithCover As Integer
     Dim x As Integer
     Dim varBMName As Variant
     Dim varBM As Variant
     Dim rst As DAO.Recordset
     Dim strSQL As String

On Error GoTo Errors
     strSQL = "SELECT tbltmpTableOfContents.ReportCaption, Min(tbltmpTableOfContents.PageNumber) AS Pg " & _
                     "FROM tbltmpTableOfContents " & _
                     "GROUP BY tbltmpTableOfContents.ReportCaption " & _
                     "ORDER BY Min(tbltmpTableOfContents.PageNumber);"
     Set rst = CurrentDb.OpenRecordset(strSQL)
     Set gApp = CreateObject("AcroExch.App")

    Set gPDDoc = CreateObject("AcroExch.PDDoc")
     If gPDDoc.Open(strPDFPath) Then
         Set jso = gPDDoc.GetJSObject


         Set BMR = jso.bookmarkRoot
         
         ' if the cover/toc is included then we add this in and
         ' the integer makes sure the bookmarks are assigned right
         ' further down if the cover/toc are included.
         If blnIncludeCoverTOC Then
             BMR.createchild "Report Cover", "this.pageNum= 0", 0
             BMR.createchild "Table of Contents", "this.pageNum= 1", 1
             intWithCover = intWithCover + 1
         End If
         With rst
             Do Until .EOF
                 varBMName = "this.pageNum= " & CStr(!Pg + intWithCover)
                 x = !Pg + intWithCover
                 varBM = !ReportCaption
                 BMR.createchild varBM, varBMName, x
                 .MoveNext
             Loop
             gPDDoc.Save PDSaveCopy, strPDFPath

            gPDDoc.Close
         End With
     End If

    Set gPDDoc = Nothing
     rst.Close
     Set rst = Nothing
     AddBookmarks = True

ExitHere:
      Exit Function

Errors:
             AddBookmarks = False
             MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure AddBookmarks of Module basAcrobat2", , CurrentDb.Properties("AppTitle")
             Resume ExitHere
             Resume

End Function
0
 

Accepted Solution

by:
rogerdjr earned 0 total points
ID: 39685715
Please re-open and I'll make the change

I did not understand the grading system - my apologies to the expert that was trying to help.
0
 

Author Closing Comment

by:rogerdjr
ID: 39695016
Expert - provided a response that led me to the web to get a solution
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

636 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