关于VB6调用office程序问题
我用VB6编写的程序中,想调用office办公套件中的应用程序(只是打开窗口,不打开具体文件),Word、Excel、Access、PowerPoint和FrontPage等,但问题是有的能打开,有的打不开(Word、Excel和FrontPage能打开,Access和PowerPoint不能打开),请指教,这是什么问题?谢谢!代码如下:引用:
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 Cmd_Word_Click()
Call ShellExecute(Me.hWnd, "open", "winword.EXE", "", 1, 5)
End Sub
Private Sub Cmd_Excel_Click()
Call ShellExecute(Me.hWnd, "open", "Excel.EXE", "", 1, 5)
End Sub
Private Sub Cmd_Access_Click()
Call ShellExecute(Me.hWnd, "open", "MSACCESS.EXE", "", 1, 5)
End Sub
Private Sub Cmd_PPT_Click()
Call ShellExecute(Me.hWnd, "open", "PowerPNT.EXE", "", 1, 5)
End Sub
Private Sub Cmd_FrontPage_Click()
Call ShellExecute(Me.hWnd, "open", "FRONTPG.EXE", "", 1, 5)
End Sub