PDF In-Depth

IAC - Opening a PDF from an Access table

March 23, 1999

Advertisement
Advertisement
 

How to open a PDF file with Reader from an Access table.

This code sample is posted here for the general benefit of the PDF development community. Attribution and usage guidelines are as noted in the code source; please respect the wishes of the author when using this code.


Option Compare Database

Option Explicit

Sub OpenEachFileInTable()

    On Error GoTo ErrorHandler

    Dim db As Database

    Dim rs As Recordset

    Set db = CurrentDb

    Set rs = db.OpenRecordset("Filenames")

    Do Until rs.EOF

    ' Start Acrobat Reader

        Shell "c:\acrobat3\Reader\AcroRd32.exe " + rs("strFilename"), vbHide

        rs.MoveNext

    Loop


    ' Cleanup

    rs.Close

    Set rs = Nothing

    Set db = Nothing


    Exit Sub

ErrorHandler:

' Display error message

    MsgBox Err.Description

    Resume Next

End Sub
PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Quick PDF Library

Get products to market faster with this amazing PDF developer SDK. Over 900 functions and an equally...

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.

Features

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.