how do you make it so that when a user hits a button, and it links to a file extension handled by another program. (for example an adobe .pdf file)
i want the user to hit the button, and it opens adobe with the pdf file open.
Durgon
Printable View
how do you make it so that when a user hits a button, and it links to a file extension handled by another program. (for example an adobe .pdf file)
i want the user to hit the button, and it opens adobe with the pdf file open.
Durgon
Does it work to use
? I guess I've never tried that...Code:Shell "myfile.pdf", vbNormalFocus
- john
[Edited by RoyceWindsor1 on 05-05-2000 at 06:46 PM]
that doesnt work...
Hello,
you will need to use the ShellExecute API call:
PLace in a modual
use a call like the follwing:Code:
Public Const SW_SHOWNORMAL = 1
Public Declare Function ShellExecute 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
I hope I got it all, APi calls can get very interesting with there paramaters.Code:sPath = App.Path & "\something.pdf"
lRtn = ShellExecute(Me.hwnd, "Open", sPath, 0&, 0&, SW_SHOWNORMAL)
Hope this helps
Best