Reference anchor in CHM from external app

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Reference anchor in CHM from external app

Unread postby Erich Carshagen » Tue Oct 10, 2017 3:28 pm

Hi, Where have compiled our chm file and found that we were missing some links from within our app to anchors defined within the chm file. We have defined the link as follows: umerrormessage.htm#connect_error_message_detail. Are we missing something? Thank you.
Erich Carshagen
 
Posts: 12
Joined: Mon Feb 13, 2017 4:25 pm

Re: Reference anchor in CHM from external app

Unread postby Tim Green » Wed Oct 11, 2017 6:51 am

Hi Erich,

That would be the correct basic syntax since the files inside the CHM are normal HTML files served up with the WebView instance of Internet Explorer. (The CHM viewer is basically a (very) old version Internet Explorer with a different interface.)

However, you also need to know how to make the calls in your specific programming environment. Although all CHM calls from applications are made via the HTML Help API (documented in the help file of the MS HTML Help Workshop compiler package), how you make calls to CHM files depends on the programming language you are using. You can find tutorials for interfacing with CHM files for most current programming languages here:

http://www.helpandmanual.com/support_tutorials.html
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: 19548
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Reference anchor in CHM from external app

Unread postby julio » Wed Oct 11, 2017 1:57 pm

The syntax to open a CHM file from another CHM file is the following:
Code: Select all
hh.exe ms-its:<filename.chm>::/<topic.htm|topic.html>#<anchor>


Where:
hh.exe: CHM viewer, used on the File name field on File Link tab of the Edit Hyperlink window on H&M.
filename.chm: The CHM file to open. It must be on the same folder, there is no room for relative or absolute paths.
topic.htm|topic.html: The name of a topic to open, usually the same as the topic ID, but all in lowercase.
anchor: An anchor on the topic if you want to go to a specific position on the topic.

The part of this syntax beginning with ms-its goes on the Execution parameters field on File Link tab of the Edit Hyperlink window on H&M.
The file extension (.htm or .html) is configured on the Configuration - Publishing Options - Microsoft HTML Help - HTML Export Options - Extension for HTML files option.
User avatar
julio
 
Posts: 74
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil

Re: Reference anchor in CHM from external app

Unread postby Tim Green » Wed Oct 11, 2017 3:45 pm

Hi Julio,

That's all correct, but the syntax for calling topics and anchors in a CHM from applications is a different subject, and is very different from one programming system to another. That's why it's important to reference the tutorials for the language being used for this. :)
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: 19548
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 1 guest