Opening a pdf file from a button

  • Thread starter Thread starter reidarT
  • Start date Start date
R

reidarT

I have pdf-files in a folder.
When the file exists I want to open it by clicking a button. How do I do
that?
reidarT
 
I have pdf-files in a folder.
When the file exists I want to open it by clicking a button. How do I do
that?
reidarT

You can code the click event on a command button, for example:

Application.FollowHyperlink "c:\Foldername\FileName.pdf"

Use error handling to trap the error raised if the file does not
exist.
 
Back
Top