hebe said:
I created a button to open a folder on our network. I can
open the excel files but the Powerpoint Word and Access
files I can't can anyone help me? I am also trying to
open adobe acrobat files with excel any help
thanks
Just use the standard windows functions.
Private Declare Function ShellExec Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub OpenMyFile(myFile As String)
Dim nResult
nResult = ShellExec(0, "open", myFile, "", "", 1)
If (nResult <> 33) Then MsgBox "Error !"
End sub
This will do the same thing that if you were double-clicking on the
"MyFile" item in window.
I have tested it with a folder, and it opens a window. It should work
with evry other file.
Laurent