Custom Help

W

William

Hi,

I've developed an application in Access XP that I am
packaging with Office XP Developer. I've also created a
new Help file using EasyHelp. Before packaging, I want to
replace the standard Help button on the Access menu bar
with a button that calls up the new help file. I tried to
follow instructions in Microsoft Access Help but am
getting nowhere!

Can anyone give me some guidance on how I can do this.

Any help with "Help" will be appreciated.

Thanks,

William
 
P

Paul Overway

1. Create a module with the following code:

'CODE START

'These are used for WinHelp
Private Const HELP_CONTEXT = &H1 'Display topic for Help context ID.
Private Const HELP_QUIT = &H2 'Terminate Help.
Private Const HELP_INDEX = &H3 'Display Help index.
Private Const HELP_CONTEXTPOPUP = &H8& 'Display Help context as a pop-up
'window.
Private Const HELP_FINDER = &HB& 'If found, Display container file.
Private Const HELP_KEY = &H101 'Display topic for keyword.

'Declare the WinHelp function.
Private Declare Sub WinHelp Lib "user32" Alias "WinHelpA" (ByVal hWnd As
Long, _
ByVal lpHelpFile As String, ByVal wCommand As Long, _
ByVal dwData As Any)

Function OpenWinHelpContainer(hWnd As Long, ByVal FileName As String)
'Opens the Help container.
WinHelp hWnd, ByVal FileName, _
HELP_FINDER, ByVal vbNullString
End Function

Function OpenHelp()

On Error Resume Next

OpenWinHelpContainer Application.hWndAccessApp, "YOUR HELP FILENAME
HERE"

End Function

'CODE END

2. Modify OpenHelp function as necessary for your app
3. Set On Action property of your menu control to OpenHelp
 

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