方法一:
调用两个API函数“shellexecute"和"getdesktopwindow"
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 Declare Function GetDesktopWindow Lib "user32" () As Long
Private Const SW_SHOWMAXIMIZED = 3
Private Sub Command1_Click()
Dim pat
pat = "c:\1.ppt" '假设是你所放文件的路径
ShellExecute GetDesktopWindow(), "open", pat, pat, "C:\", SW_SHOWMAXIMIZED
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()
On Error GoTo Errhandle
ShellExecute Me.hwnd, "open", "C:\aa.ppt", vbNullString, vbNullString, 1
Exit Sub
Errhandle:
MsgBox Err.Description & "!", vbInformation
End Sub