|
-
Apr 3rd, 2003, 11:48 AM
#1
Thread Starter
Hyperactive Member
How can I call MyPowerPointShow.ppt from a vb button?
Hello,
How can I call MyPowerPointShow.ppt from a vb button?
Thanks,
Gary
-
Apr 4th, 2003, 04:11 AM
#2
Shouldn't this be in the General VB forum?
In the common section:
VB Code:
Private 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
In your code
VB Code:
dim abc as long
abc = Shellexecute ("c:/mypowerpointthingy.ppt", "Open", DocName, "", "C:\", SW_SHOWNORMAL)
or do a search on shellexecute
-
Apr 7th, 2003, 07:04 AM
#3
Thread Starter
Hyperactive Member
Thanks, Mendhak,
I will try that as soon as I nurse my computer back to health.
Gary
-
Apr 7th, 2003, 08:07 AM
#4
Thread Starter
Hyperactive Member
Okay, what did I do wrong?
I get an error message that says "DocName" is undefined.
Option Explicit
Private 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
Private Sub Command1_Click()
Dim abc As Long
abc = ShellExecute("c:/slidetest.ppt", "Open", DocName, "", "c\", SW_SHOWNORMAL)
End Sub
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
|