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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding HTML Help to Access 97 application

Status
Not open for further replies.

calian

Programmer
Jun 6, 2000
50
US
Can anyone point me to a tutorial or the url of an msdn page that explains how to tie compiled HTMLHelp to Access? I want to add context sensative help to application forms. <br><br>I've have the application involved about half done (files and forms, but not reports), and have written some sample html pages and compiled them. I've assigned the name of the .chm file to the appropriate form property, and the html page id# to the appropriate control property, but when I try to invoke the .chm file I get an error message indicating the 'help file is corrupted or not a valid help file'.<br><br>I'm guessing this means I need to set a property somewhere to permit Access to see .chm as a valid help format instead of the older version. I guess I need better glasses, but I can't find the switch.<br><br>Thanks for any help.
 
Does this compiled HTML document ned to be opened in Internet Explorer<br>Maybe you could use the Shell statement. Or other App launching specs to launch IE and pass the name of your compiled HTML to it.<br>Here is similar code for doing that:<br>----------------------------<br>Opening a browser to your homepage<br>submitted by Dan Newsome<br>D&D Information Professionals, <A HREF="mailto:newsomed@earthlink.net">newsomed@earthlink.net</A><br>You can use code like the following to open a browser to your homepage. Modify filenames, paths, and URLs as necessary to match the values on your system.<br><br>Dim FileName As String, Dummy As String<br>Dim BrowserExec As String * 255<br>Dim RetVal As Long<br>Dim FileNumber As Integer<br>Const SW_SHOWNORMAL = 1 ' Restores Window if Minimized or<br><br>Declare Function ShellExecute Lib &quot;shell32.dll&quot; Alias &quot;ShellExecuteA&quot; _<br>(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _<br>ByVal lpParameters As String, ByVal lpDirectory As String, _<br>ByVal nShowCmd As Long) As Long<br><br>Declare Function FindExecutable Lib &quot;shell32.dll&quot; Alias &quot;FindExecutableA&quot; _<br>(ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As _<br>String) As Long<br>'&lt;Code&gt; ---------<br><br>BrowserExec = Space(255)<br>FileName = &quot;C:\temphtm.HTM&quot;<br><br>FileNumber = FreeFile() ' Get unused file number<br><br>Open FileName For Output As #FileNumber ' Create temp HTML file<br>Write #FileNumber, &quot; &lt;\HTML&gt;&quot; ' Output text<br>Close #FileNumber ' Close file<br><br>' Then find the application associated with it.<br>&nbsp;&nbsp;RetVal = FindExecutable(FileName, Dummy, BrowserExec)<br>&nbsp;&nbsp;BrowserExec = Trim$(BrowserExec)<br>&nbsp;&nbsp;' If an application is found, launch it!<br>&nbsp;&nbsp;If RetVal &lt;= 32 Or IsEmpty(BrowserExec) Then ' Error<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Msgbox &quot;Could not find a browser&quot;<br><br>&nbsp;&nbsp;Else<br>&nbsp;&nbsp;&nbsp;&nbsp;RetVal = ShellExecute(frmMain.hwnd, &quot;open&quot;, BrowserExec, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;<A HREF=" TARGET="_new"> Dummy, SW_SHOWNORMAL)<br>&nbsp;&nbsp;&nbsp;&nbsp;If RetVal &lt;= 32 Then ' Error<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Msgbox &quot;Web Page not Opened&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;End If<br><br>Kill FileName ' delete temp HTML file<br><br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top