Open a file in its associated application?

M

Michael Sutherland

I'm attempting to use a Hyperlink within a database to open an outside
Acrobat or Word file.

I've placed the path into the database, and I've accessed the path in my
program via the normal connection/dataadapter/dataset method. I've gotten to
the point where I can output the path as a string in a message box.

Does anybody know a function that would allow me to open that file in its
associated application? In other words, when I cause an event, what function
will use the supplied path to open a .doc file in Word?

Thanks for your help!
Michael Sutherland
(e-mail address removed)
 
H

Herfried K. Wagner [MVP]

* "Michael Sutherland said:
I'm attempting to use a Hyperlink within a database to open an outside
Acrobat or Word file.

I've placed the path into the database, and I've accessed the path in my
program via the normal connection/dataadapter/dataset method. I've gotten to
the point where I can output the path as a string in a message box.

Does anybody know a function that would allow me to open that file in its
associated application? In other words, when I cause an event, what function
will use the supplied path to open a .doc file in Word?

Opening a file:

\\\
Imports System.Diagnostics

..
..
..
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = "C:\bla.html"
Process.Start(psi)
..
..
..
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top