任何文件都可以,只要關(guān)聯(lián)了相關(guān)的程序
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
\’調(diào)用打開c:a.ppt
Private Sub Command1_Click()
Dim pat
pat = \"c:a.ppt\" \’假設(shè)是你所放文件的路徑
ShellExecute Me.hwnd, \"open\", pat, pat, vbNull, 3
End Sub
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
\’調(diào)用打開c:a.ppt
Private Sub Command1_Click()
Dim pat
pat = \"c:a.ppt\" \’假設(shè)是你所放文件的路徑
ShellExecute Me.hwnd, \"open\", pat, pat, vbNull, 3
End Sub