HTMLHelp Call

  • Thread starter Edward Thrashcort
  • Start date
E

Edward Thrashcort

I'm very annoyed that the VBA HTMLhelp file does NOT want to give up its
secrets about how to call an individual page from a CHM file in a VBA
application. This MUST be a massive FAQ?

Eddie
 
E

Edward Thrashcort

Hmmm... looks as if no-one else knows either!

I found something on microsoft.com

Eddie
 
J

Jonathan West

Edward Thrashcort said:
I'm very annoyed that the VBA HTMLhelp file does NOT want to give up its
secrets about how to call an individual page from a CHM file in a VBA
application. This MUST be a massive FAQ?

Eddie

Actually, VBA userforms don't support HTMLHelp at all. Crazy, but true.
HTMLHelp was new when VBA came out, and they didn't have time to get support
properly in - UserForms support the old Winhelp.

You can create a commandbutton on a form and put code behind the button to
open an HTMLHelp file at a specific page. This article will help you.

http://frogleg.mvps.org/helptechnologies/htmlhelp/hhvbsmpl.html


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
E

Edward Thrashcort

Thanks for that Jonathan

Overcoming my incredulity, I had worked-out that VBA forms did not support
HTMLHelp context sensitive help! Given the total cock-up that MS made over
the non-implementation of WinHelp on Vista you can't help wondering if the
Windows/Office development teams talks to the MS HTMLHelp developers!

I found this on MS
http://msdn2.microsoft.com/en-us/library/aa164218(office.10).aspx

Unfortunately when I try running this line...

Call HtmlHelp(0, HelpPath, HH_DISPLAY_TOPIC, TopicName)

...where HH_DISPLAY_TOPIC = &H0
and I've hard-coded the path to one of my own CHM files
and the TopicName is one of the files in the CHM
(which I checked by decompiling the CHM)

...then the CHM file displays but it ALWAYS displays "The page cannot be
displayed"

Eddie
 
E

Edward Thrashcort

To complete this thread for anyone lurking, I eventually solved the problem
with the help of a very competent chap called Ulrich Kulle in the
HelpAuthoring forum with this...

http://www.help-info.de/en/Visual_Basic_Applications/vba.htm

The problem with the documentation on Microsoft is that the API function had
a variable that was defined as "dwData as Any" and defining the variable as
"Variant" in MSWord is a form of data type mismatch which does not generate
a specific error code.

You have to declare individual functions for each data type that you want to
pass in dwData.

So, in summary, MS online documentation is once again found to be sloppy and
not tested!

Eddie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top