shell "winword C:\FileName.doc",1

解决方案 »

  1.   

    最好加上
    on error resume next
      

  2.   

    Public 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, vbNullString, "d:\FileName.doc", 
        vbNullString, vbNullString, 1