VB打开演示文稿

来源:百度知道 编辑:UC知道 时间:2024/05/23 14:45:34
如何在VB中点击按钮后,打开演示文稿?
Shell好像不管用啊!

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
Const SW_SHOW = 5

Private Sub Command2_Click()
ShellExecute Me.hwnd, "open", "POWERPNT.EXE", "c:\1.ppt", "", SW_SHOW
End Sub