Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Word Files 3

Status
Not open for further replies.

demax182

Technical User
Jul 13, 2004
43
US
Hi,

In my form, I have a field which specifies the path of a specific file (PDF, Excel, or Word File). I'm trying to create a command button that when you click on it, it opens that specific file in the field. Is anything like that possible? Thanks in advance for your help.

Mike
 
Hi,

If you just want to open the file than use

Dim strPath As String

strPath = Me.TxtFilePath '(The path should be complete)

Application.FollowHyperlink strPath, , True, False

Give it a go n see what happens.

Cheers!
ÙÇãá

It's important to learn the rules so that you know how to break them.
 
Aqif,

Works like a charm! Thanks a bunch!

Mike
 
Aqif,
Thanks. Your reply helps to simplify some code I've been using to do the same thing.


Randy
 
Hi,

Thanks for the Star Guys :) Happy to help

Cheers!
ÙÇãá

It's important to learn the rules so that you know how to break them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top