|
-
May 5th, 2000, 05:33 AM
#1
Thread Starter
New Member
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
-
May 5th, 2000, 05:45 AM
#2
Does it work to use
Code:
Shell "myfile.pdf", vbNormalFocus
? I guess I've never tried that...
- john
[Edited by RoyceWindsor1 on 05-05-2000 at 06:46 PM]
-
May 5th, 2000, 05:51 AM
#3
Thread Starter
New Member
-
May 5th, 2000, 07:56 AM
#4
Hello,
you will need to use the ShellExecute API call:
PLace in a modual
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
use a call like the follwing:
Code:
sPath = App.Path & "\something.pdf"
lRtn = ShellExecute(Me.hwnd, "Open", sPath, 0&, 0&, SW_SHOWNORMAL)
I hope I got it all, APi calls can get very interesting with there paramaters.
Hope this helps
Best
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|