Recent security updates from Microsoft have made it increasingly difficult to link to and from compiled help files (CHM). This page will offer some tips and resources relating to launching and referencing CHM files.

Linking to Topics in Merged Help

In a merged helpset, ePublisher will create a Master CHM as well as a separate CHM for each project Group. All of the CHM files must be distributed together, as the merge is done at runtime when you launch the Master file. To create a link from one child CHM to a specific topic file in another, we recommend this procedure:

In the first CHM, add a link with a URL as follows:

This syntax is referenced in Microsoft's developer web article here:

The link must open the designated topic file in the current HTML Help window. Security limitations prevent a CHM file from launching a new HTML Help window. To ensure this, open Format Settings in your ePublisher project and set the External URL Target to "_self" before regenerating output.

Linking to Another (Unrelated) CHM

It is possible to create a link from one CHM to another, other than in a merged helpset. However, you need to keep a couple of things in mind:

If the file is stored locally and you know the full path, we have found this link URL will work for opening topics in another CHM:

Note: This syntax differs from that specified in Microsoft's developer reference article here:

This will open the topic from the second CHM in the current HTML Help window. Again, you'll need to specify this by opening the Format Settings in your ePublisher project and setting the External URL Target to "_self" before regenerating output. Note also that the TOC and Index will remain the same (referencing the first CHM).


Here are some helpful links to Microsoft web pages offering details regarding the problems you might face with CHM links and the solutions provided here:

Late Night Merge Attempt

This is not a complete solution. Just a starting point for automating this task. It might be better to create a data file to read which defines a list of additional .chm files to reference when producing the final merged .chm file.

Override "Transforms/htmlhelp_hhp.xsl" and look around line 353 of the root match template:

Have this transform search not just for ePublisher generated CHM files, but also for any .chm files that are coming along for the ride in your <project>/Files or baggage files folders by replacing the existing <xsl:variable name="VarMergeFiles" ... /> definition with:

This code will save you from having to edit/modify the merged .hhp file to include your other .chm files.

NOTE: Presently, this only triggers if you're got more than one top-level group defined in ePublisher. ePublisher won't otherwise emit the merge .chm. Also, this will replicate the .chm files across your individual outputs. More work needed to copy them to the top-level of the project and ignore them as lower level files.

HelpCenter/Tips/HTML_Help_LinkToCHM (last edited 2009-03-25 17:53:55 by BenAllums)