strTempName = "C:\Documents and Settings\liulinsheng\桌面\新建文件夹\temp.doc"
Shell "C:\Program Files\Microsoft Office\Office10\winword " & strTempName, vbNormalFocus
请问为何打不开。

解决方案 »

  1.   

    你Shell的格式应该没问题,但有关键的一点:shell是用于打开.exe程序,即不能打开doc文件。
      

  2.   

    至于如何打开,我也刚刚提出了关于打开.hlp的问题。
      

  3.   

    ShellExecute 0, "OPEN", strTempName, "", "C:\Program Files\Microsoft Office\Office\winword", 1
      

  4.   

    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 LongShellExecute是API函数
      

  5.   

    对非可执行文件,应该在shell前加上call就行了