1. shell "start docPATH/chmPATH"2. shellexecute(me.hwnd,"open",filename,"",PATH,5)

解决方案 »

  1.   

    shell "hh.exe chm.chm"
    hh.exe是打开CHM格式类型的可执行文件 
      

  2.   

    Const HH_DISPLAY_TOPIC = &H0
    Const HH_SET_WIN_TYPE = &H4
    Const HH_GET_WIN_TYPE = &H5
    Const HH_GET_WIN_HANDLE = &H6
    Const HH_DISPLAY_TEXT_POPUP = &HE
    Const HH_HELP_CONTEXT = &HF
    Const HH_TP_HELP_CONTEXTMENU = &H10
    Const HH_TP_HELP_WM_HELP = &H11
    Const HH_CLOSE_ALL = &H12
    Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, ByVal dwData As Long) As Long
    Private Sub Form_Load()
       
        Dim hwndHelp As Long
        
        hwndHelp = HtmlHelp(hWnd, "myfile.chm", HH_DISPLAY_TOPIC, 0)
    End Sub
    Private Sub Form_Unload(Cancel As Integer)
        HtmlHelp Me.hWnd, "", HH_CLOSE_ALL, 0
    End Sub----------------------
    WordDim objWord  As Word.Application
    Dim objDocument As Word.DocumentSet objWord = CreateObject("Word.Application")
    Set objDocument = objWord.Documents.Open("C:\word.doc)       
      

  3.   

    Shell "D:\Program Files\Microsoft Office\Office\winword.exe c:\word.doc", vbNormalFocus
      

  4.   

    各位大侠:
    首先感谢您们的帮助,我用上述方法使了一下,提示找不到文件。
    我的文件为C:\HPtest\help1.chm,现希望能用菜单直接打开。
    Private Sub h_help_Click()
    End Sub
      

  5.   

    it is ok?!Private Sub Form_Load()
    Dim dbltest As Double
    dbltest = Shell("hh C:\HPtest\help1.chm", vbMaximizedFocus)
    End Sub
      

  6.   

    呵呵,怎么可能呢,楼上各位说得都对的啊
    再提供一种方法参考
    运行通过private command1_click()
        set s=createobject("wscript.shell")
        s.run "hh C:\HPtest\help1.chm"
    end sub否则可能是你的文件路径不正确,或hh.exe 浏览引擎被卸了