Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2007

Tip: Looking for answers? Try searching our database.

HTMLHelp Call

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Edward Thrashcort - 01 Apr 2007 23:59 GMT
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
Edward Thrashcort - 02 Apr 2007 14:28 GMT
Hmmm... looks as if no-one else knows either!

I found something on microsoft.com

Eddie
Jonathan West - 02 Apr 2007 18:02 GMT
> 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

Signature

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

Edward Thrashcort - 02 Apr 2007 21:19 GMT
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

> *From:* "Jonathan West" <jwest@mvps.org>
> *Date:* Mon, 2 Apr 2007 18:02:20 +0100
[quoted text clipped - 14 lines]
>
> http://frogleg.mvps.org/helptechnologies/htmlhelp/hhvbsmpl.html
Edward Thrashcort - 04 Apr 2007 10:41 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.