执行到这里时出现“文件没有找到”的错误,而shell "Explorer"就可以。在“开始”-“运行”中输入winword是可以执行的。

解决方案 »

  1.   

    我这里运行不了winword直接在运行里你路径完全就可以了shell "c:\windows\winword.exe"
    这样就可以运行了
      

  2.   

    winword不在windows目录下,无法直接使用相对路径
    你要找到绝对路径,读注册表,找office的安装路径
      

  3.   

    如果用户没有装在指定路径下怎么办?读注册表,找office的安装路径
      

  4.   

    同志们,WORD安装以后是不是有一个系统SHELL啊?直接调用就可以了!没那么麻烦
      

  5.   

    哈哈
    不好意思我从来没用国office
      

  6.   

    Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As LongPrivate Sub Command1_Click()
        Dim sPath As String * 260
        
        Open App.Path & "\A1B1C1D1.doc" For Output As #1
        
        Close #1
        
        FindExecutable App.Path & "\A1B1C1D1.doc", "", sPath
        
        Kill App.Path & "\A1B1C1D1.doc"
        
        Shell sPath, vbNormalFocus
        
        
    End Sub