Browsing for and then hyperlinking to Word files from a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am building an Access data entry form. I would like to have a button on
the form that the user can click on that would bring up the file browser.
The path to the file they end up choosing should be recorded in a field.

Then, by clicking another button they should be able to open the Word file
that is indicated in that field.

I have no idea where to start, and I'm hoping you can help. Thanks!
Bart
 
Bart said:
I am building an Access data entry form. I would like to have a
button on the form that the user can click on that would bring up the
file browser. The path to the file they end up choosing should be
recorded in a field.

Then, by clicking another button they should be able to open the Word
file that is indicated in that field.

I have no idea where to start, and I'm hoping you can help. Thanks!
Bart

If you're using Access 2002 or later, you can use the built-in
Application.FileDialog method to browse for the file. To avoid version
incompatibilities, though, I usually call the Windows File Open/Save
Dialog API directly, using code like what is posted here:

www.mvps.org/access/api/api0001.htm

Having stored the name and path of a .doc file in a field, you can open
the file in Word using the Application.FollowHyperlink method; e.g.,

Application.FollowHyperlink Me.DocFilePath
 
Back
Top