Skip to content

GustavBrock/VBA.HtmlHelp

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

VBA.HtmlHelp

Help

Viewing a compressed help file

An HTML help file itself is of a special compressed format - with the extension .chm - which requires a special viewer. That viewer is often the native viewer of Windows, Microsoft HTML Help Viewer, an OCX control.

From VBA, the viewer is opened via one of two API calls to the control, hhctrl.ocx, which normally is present on all newer Windows installs. This would be very simple, if not for these traps:

  • If a context ID is passed for no purpose, the application may crash
  • If the help viewer is not closed before exiting the application, the application may crash
  • the help viewer will not by itself move to the Contents tab when a context is opened

The documentation on the control is sparse and rudimentary, almost nil, and these traps are to be found by trial and error or to be extracted bit by bit at various fora and blog posts. However, once taken care of, the usage is straight-forward. Only one function is needed.

Form

Code

Code has been tested with both 32-bit and 64-bit Microsoft Access 2019 and 365.

Documentation

Full documentation can be found here:

EE Logo

Control the HTML Help Viewer OCX control

Included is a Microsoft Access example application.


If you wish to support my work or need extended support or advice, feel free to:

About

VBA module for controlling the Microsoft HTML Help Viewer control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages