vb里面如何打开ppt?

来源:百度知道 编辑:UC知道 时间:2024/09/23 05:00:53
你的方法打开word,我要的是打开ppt,power point

当然是使用VBAPI了
创建窗体工程
先声明如下
const SW_SHOW =5
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

然后你就调用吧
ShellExecute Me.hwnd, "open", "winword.exe", "d:\\111.doc", "", SW_SHOW
保证好使