Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2005, 04:45 AM
Authorized User
 
Join Date: Mar 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML Help(.chm) - Who know?

I want do display HTML Help(.chm) when press an Button.
How can do this?
 
Old April 10th, 2005, 12:42 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

You didn't say what "a button" is. If you mean a button on a form, there are two easy ways:

Set the Hyperlink Address property of the button to the name of the CHM file. Unfortunately, this prompts the user to approve opening the file.

Or, to avoid the user being prompted...

Write this code in the Click event for the button.

Dim x As Long
x = Shell("hh.exe your_help_file_spec")

If your_help_file_spec has spaces in it, use this syntax...
x = Shell("hh.exe ""your help file spec""")

If you mean a button the the keyboard (in particular F1) to open the file, set the Help File property of the form to the name of your help file. Set the Help Context ID property to a number that will display the main help page. If you have specific help context for each field, you can set the Help Context ID for each field. Then F1 will open to the specific help.

Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org
 
Old April 10th, 2005, 02:37 PM
Authorized User
 
Join Date: Mar 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I used:
Dim x As Long
x = Shell("hh.exe help")
But 'The page cannot be displayed'
 
Old April 11th, 2005, 07:31 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

I doubt that "help" is the file spec of your "chm" file.

"your_help_file_spec" must be a "file spec" or "file specification". A file spec is the fully qualified name that you would use to find the file on your computer.

To test this on my machine, I used the chm that instaled when I installed Cute Printer (a great FREE application from http://www.cuteprinter.com that will output PDF files). Thus...

Dim x as Long
x = Shell("hh.exe C:\cuteprinter\cuteprinter.chm")

works!

Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org
 
Old April 13th, 2005, 04:17 AM
Authorized User
 
Join Date: Mar 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help. It was very useful.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open a particular page in chm file using c# Rajesh.Prajapat C# 1 October 29th, 2008 04:31 AM
Access 2007 Ribbon button link to .chm aholley0628 Access 0 September 13th, 2007 02:35 PM
including .chm in deployment setup.exe nutrino VB.NET 1 March 27th, 2006 11:55 AM
Including .chm file in deployment Setup.exe nutrino VB How-To 1 March 23rd, 2006 09:50 AM
displaying pdf, .chm files within a C# application connect2sandep General .NET 3 January 8th, 2006 01:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.