Importing and Reading a PDF in Access

  • Thread starter Thread starter Guest
  • Start date Start date
Yes, you can easily link to any type of file, including PDFs. Do not store
them in your db but rather store their paths and filenames. Then use the
followhyperlink method to open then. It is the same concept as with working
with images in a db.

You can use a file dialog to allow your users to browse/locate the files
then pass the path/filename to the proper control to be stored. Finally
create a double-click even which utilizes the foolowhyperlink method to open
them.
 
OK good, but there are a couple of new terms in your response that challenges
me. What type object do I create to start this process? For example I
imagine that I can add a button (or something) to a form that says "open
file" and then it would hyperlink to it? What is dialog box/method?
 
Take a look at the example, that is the best way to learn!

Here are the basics:

i- you're going to create your table that house your info. in this table
you will create a field to store the path/file.
ii- Using your form you will have a control that use the path/file field as
it's controlsource.
a) create a button with a click event that opens a file dialog (
http://www.mvps.org/access/api/api0001.htm ). Basically, when your user
click the button a browse dialog will open so they call go and select the
file in question. you then pull the path/file name from theri selection and
use it to populate your control which in turn add it to the table.
b) for this specific control, create a click event that uses the
followhyperlink method so that when your users select/click on the control it
will open the file for them.
Application.FollowHyperlink Me.YourControlName

And you're done!

Look at the sample and try an link what I just said to them so you can
understand the coding and sequence of events.
--
Hope this helps,

Daniel P
 
yet another reason that PDF sucks! it's a pain in the butt to get
info out of!

Tell your beancounters to stop using Excel for everything; and
convince someone to send them through a Crystal Reports class or
something

otherwise; mountains and mountains of PDF jsut get bigger and bigger
 
Back
Top