Enter file path in text box, use button to open file

  • Thread starter Thread starter silva
  • Start date Start date
S

silva

I was wondering if there is a way to enter the full path and file name of a
document (.pdf, .doc, or whatever) into a text box, and have a button that
will open that document when you click it (the button's command is linked to
the content of the text box). I thought I saw something that would allow
that, but I wasn't entirely certain that what I saw was the same thing as I
would like to do.
 
I was wondering if there is a way to enter the full path and file name of a
document (.pdf, .doc, or whatever) into a text box, and have a button that
will open that document when you click it (the button's command is linked to
the content of the text box). I thought I saw something that would allow
that, but I wasn't entirely certain that what I saw was the same thing as I
would like to do.



Code the command button's Click event:

Application.FollowHyperlink Me.[ControlName]
 
Excellent! Thank you. That does exactly what I need it to do.

fredg said:
I was wondering if there is a way to enter the full path and file name of a
document (.pdf, .doc, or whatever) into a text box, and have a button that
will open that document when you click it (the button's command is linked to
the content of the text box). I thought I saw something that would allow
that, but I wasn't entirely certain that what I saw was the same thing as I
would like to do.



Code the command button's Click event:

Application.FollowHyperlink Me.[ControlName]
 
Back
Top