Я не думаю, что простая ссылка на файл .chm сработает.
Для меня работает следующий формат ссылки (обратите внимание, что файл .chm должен находиться в надежном месте, общие сетевые ресурсы не будут работать по умолчанию):
mk:@MSITStore:C:\SomeDirectory\help.chm::/helppage.htm
РЕДАКТИРОВАТЬ
Для относительных путей необходимо использовать следующий шаблон:
ms-it:.\help.chm::/html/main.htm
(см. Связывание с CHM — некоторые примечания)
Эта ссылка будет открыта в IE (щелкните правой кнопкой мыши в средстве просмотра справки HTML, чтобы увидеть расположение этой ссылки в свойствах).
Другим вариантом было бы вставить MACROBUTTON и иметь макрос, открывающий средство просмотра справки HTML. Это будет код VBA:
Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, _
ByVal pszFile As String, _
ByVal uCommand As Long, _
dwData As Any) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Function GetWindowHandle() As Long
'obtain Word's hwnd
'NOTE: there is a possibility of getting the wrong hwnd. If two word windows
'are open with the same caption, this *could* happen. In order to prevent this,
'you can either change the caption to something strange before trying to find it,
'or you can compare processId's with GetCurrentProcessId and GetWindowThreadProcessId
'You can always search the top level windows yourself.
GetWindowHandle = FindWindow(Word8ClassName, ActiveDocument.Windows(1) & " - " & ActiveDocument.Application.Caption)
End Function
Public Function ShowHelp(strPage As String)
On Error Resume Next
HtmlHelp GetWindowHandle, "fullpathtohelpfile.chm", HH_DISPLAY_TOPIC, ByVal strPage
End Function
person
Dirk Vollmar
schedule
26.11.2008