Link to a topic in another file

HM5 served us well, now its time has come and it has been replaced... If you have HM5 questions, please post them here.

Moderators: Alexander Halser, Tim Green

Link to a topic in another file

Unread postby Alex Gurevich » Wed May 27, 2015 9:36 am

Dear colleagues!
We use Help and Manual for creating help files in CHM format.
How could we create a link to a topic located in another file?

For HTML help file I have found the following expression:
Code: Select all
index.html?topicname.htm#anchorname

We need a similar expression for CHM help file.

For definiteness, the file that we would like to link is called index.chm, the topic - topicname, the anchor - anchorname.
But it will be better to create the link without anchors, only to the topic in another file located in the same folder.
Thank you.
Alex Gurevich
 
Posts: 18
Joined: Wed Feb 22, 2012 6:50 am

Re: Link to a topic in another file

Unread postby Tim Green » Wed May 27, 2015 11:37 am

Hi Alex,

Alex Gurevich wrote:For HTML help file I have found the following expression:

That is for WebHelp (browser-based HTML). "HTML Help" is Microsoft's official and unfortunately confusing name for the CHM format. :)

When you link to a topic in another CHM file, the other file MUST be in the same folder as the CHM file containing the link. There are two ways to link to a topic in another CHM. Which one you use depends on whether you want the topic to be displayed inside the current help viewer or in a separate window in a new help viewer.

Display in the current help viewer

For this to work, the Help & Manual project with which you create the CHM file must have exactly the same name as the CHM file -- if you link via the project. For example, if the CHM file is called index.chm, then the project must be called index.hmxz or index.hmxp. Also, no spaces are allowed in the project or CHM file name. If the names are not the same, the link cannot know what the name of the CHM file is going to be. Alternatively, you can link directly to the CHM file, but you must have the CHM file available to be able to do that.

  1. Open the link tool to create a normal topic link and select the Help & Manual project of the other CHM file in the Help FIle: field at the bottom. Alternatively, select the CHM file in that field. The topic IDs will then be displayed.
  2. Select the correct target ID you want to link to and create the link.
  3. Make sure that both CHM files are in the same folder when the user views them.

Display in a new help viewer:

Here too, no spaces or other special characters are permitted in the CHM file names. Also, the CHM file containing the link and the CHM file you are linking to must both be in the same folder.

  1. Open the Link tool and instead of creating a topic link, select the File Link option.
  2. In the File name: field enter the program name of the help viewer:
    hh.exe
  3. In the Execution parameters: field enter the name of the CHM file and topic, using the following exact syntax:
    ms-its:helpfile.chm::/topicname.htm#anchor
    helpfile.chm is the name of the target CHM file. topicname.htm is the Topic ID of the target topic in all lower case characters plus the extension ".htm". anchor is an optional anchor ID you want to jump to on the page, also in all lower case.
  4. Make sure that both CHM files are in the same folder when the user views them.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 19730
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Link to a topic in another file

Unread postby Alex Gurevich » Wed May 27, 2015 12:30 pm

Dear Tim,

Thank you very much. It's great!
The second way is the most suitable for us.

With my best wishes,
Alex
Last edited by Alex Gurevich on Wed May 27, 2015 2:02 pm, edited 1 time in total.
Alex Gurevich
 
Posts: 18
Joined: Wed Feb 22, 2012 6:50 am

Re: Link to a topic in another file

Unread postby Alex Gurevich » Wed May 27, 2015 1:43 pm

One more question on this subject.
Is it possible to add any parameters in these expressions:
Code: Select all
hh.exe

or
Code: Select all
ms-its:helpfile.chm::/topicname.htm#anchor

or anyhow else to get the CHM file with all topics opening (visible) in the viewer (Open All)?
Alex Gurevich
 
Posts: 18
Joined: Wed Feb 22, 2012 6:50 am

Re: Link to a topic in another file

Unread postby Tim Green » Wed May 27, 2015 4:25 pm

The parameters are already the "Execution parameters:" part. There is no Open All command, and you really shouldn't need one unless you have only one chapter with all your other chapters hidden inside it. If you have done that it is an error and you need to change the structure of your project to have multiple chapters with your main themes on the top level.

If you just enter

Code: Select all
ms-its:helpfile.chm

It will simply open the other CHM file at the default topic.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 19730
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Link to a topic in another file

Unread postby Alex Gurevich » Thu May 28, 2015 7:19 am

Thank you very much!
Alex Gurevich
 
Posts: 18
Joined: Wed Feb 22, 2012 6:50 am

Re: Link to a topic in another file

Unread postby VaLene Hulme » Wed Dec 27, 2017 1:25 am

I am having trouble linking to a help topic in another .chm. If I follow the first set of instructions (using the same help window), it works fine. However, I would prefer the link to open the .chm in another help window. When I follow those instructions, open the .chm help file, and click the link, I get this error:

"The program or feature "\??\C:\Users\valeneh\Desktop\Test Builds\hh.exe" cannot start or run due to incompatibity with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available." (Yes, the error spells incompatibility wrong.)

Any ideas?

Both .chm files are in the same folder. I've attached an image of the hyperlink setup screen.
You do not have the required permissions to view the files attached to this post. This may mean that you can't view them at all, or it may just mean that you need to log into the forum to view them.
VaLene Hulme
 
Posts: 7
Joined: Thu Apr 18, 2013 9:14 pm

Re: Link to a topic in another file

Unread postby Tim Green » Wed Dec 27, 2017 9:43 am

Hi VaLene,

VaLene Hulme wrote:I am having trouble linking to a help topic in another .chm. If I follow the first set of instructions (using the same help window), it works fine. However, I would prefer the link to open the .chm in another help window. When I follow those instructions, open the .chm help file, and click the link, I get this error:

I can't reproduce this on 64-bit Windows. Either you are running an incompatible version of the HTML Help system (maybe an older or even a newer installer than the correct one) or something else is going on.

You can get the correct version of HTML Help Workshop with the compiler here:

https://www.helpandmanual.com/download/htmlhelp.exe

Before installing it, uninstall HTML Help Workshop in the Windows Control Panel and restart Windows. Note that when you install you will receive a misleading error message saying that you already have a "newer version of HTML Help". That can be ignored, it's an error in the installer. Actually, on all current versions of Windows this message means that the compiler has been installed correctly.

Things to check if that doesn't help:

  1. How are you starting the CHM file when you are getting the error? The options would be a) Automatically after publishing with HM, b) From your application and c) By double-clicking it in Windows File Explorer.
  2. If you are starting from your application, is it a 64-bit or a 32-bit application?
  3. Are you compiling the CHM on 32-bit or 64-bit Windows?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 19730
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 5 Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron