Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Help File in Word 1

Status
Not open for further replies.

faztech

Programmer
May 21, 2001
22
AU
I am trying to open a help file (.hlp) that i created in word. I have a form with a button ('show help') that I want to open my help file when clicked. I have not set a help context id I just want to open it. Does anyone know how to do this?

Thanks

Faztech
;-)
 
Option Explicit

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub CommandButton1_Click()
Dim sFile As String
sFile = "C:\Program Files\Norton AntiVirus\enulotus.hlp"

Call ShellExecute(0&, "Open", sFile, vbNullString, vbNullString, 0&)
End Sub
 
Care to specify how this works justinEzequiel?
Also faztech how did you create the help file in word? Is it an ordinary .doc file or did you compile it to a .hlp file?
D.
 
Thanks Justin that worked great. Deetee2000, I made the help file with a program I downloaded from the net called Microsoft Help Workshop. First make a word file in format .rtf, with all you help documentation and then just follow the instructions outlined in Help Workshop. It is really easy and looks great.

Thanks again

Faztech
X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top