|
25 Years of Programming
An open source source for C, C++, OWL, BASIC, MDB, XLS, DOT, and more... |
Home Projects Up Sitemap Search Blog Forum+Chat About Us Privacy Terms of Use Feedback FAQ Images Services Payments Humor Music |
Microsoft Word template for creating a Windows WinHelp fileHELPFILE.DOT is a Word document template that provides some starting text for creating the .RTF file used by the Windows Help Compiler to create a Windows 3.1 style help file (*.HLP). It has a macro that partially automates the creation of the footnotes that are required. The difficult part of creating the footnotes is jumping back and forth between the main document and the footnote pane. The macro prompts you for the information to put in the footnotes, then inserts the footnote markers and creates the footnotes, doing all the pane-jumping for you. When you're finished creating the document, be sure to save it as .RTF, not .DOC. The zip file contains both the Word 6.0 and Word 2003 versions. The one you plan to use should be renamed to HELPFILE.DOT. I used the Word 6.0 version often, but the Word 2003 conversion is mostly untested except that many people have downloaded it and I haven't received any bug reports. Click here to download helpfiledot.zip (26 KB). Text contents of the HELPFILE template (the instructions for use)This page contains commonly used sections for your .HPJ file. Revise this page as needed, and copy it as ASCII TEXT into your
PROJECT.HPJ file. [OPTIONS] [CONFIG] [FILES] Reference information while creating your Help file: This section should also be deleted before compiling your Help project: For help, see c:\bc4\bin\cwh.hlp. (That file is distributed with Borland C++ 4.0.) Toolbar: The WinHelp Development Tools toolbar has a button with the CreateHelpTopicFootnotes macro assigned to it. To create footnotes, position cursor at the left margin of the topic heading line, then run the macro CreateHelpTopicFootnotes. It will prompt you for the text to use in the footnotes. Footnotes: MACRO: CreateHelpTopicFootnotes will create footnotes for you. How to format Jumps and Popups: A Jump HID_AJUMP The formats (but not necessarily the text) must be immediately adjacent to each other. If there is a space in the text, make sure one of the formats is applied to the space. Do not use smart quotes or smart apostrophes (AutoCorrect option) in the file. The compiler strips them out. Format (as Jumps and Popups) only the exact text that needs formatting. The compiler does not recognize hidden paragraph marks, so don't include paragraph marks in the text selected for formatting. Putting columnized text into a table prevents wrapping. See MSWord 6.0 Help Tips on Indenting Paragraphs. Here is an alternative: In WinHelp files, you sometimes need the equivalent of a table whose columns individually wrap. However, tables don't wrap. Instead, set a tab stop where the second column should begin (click on the Ruler), and also set a hanging indent to that point (drag the tab setter at the bottom left of the Ruler -- without dragging its upper partner -- to match the tab stop. In the help file, when you shrink the window horizontally, the second column will wrap without going all the way back to the left margin. See Keys.rtf (a Borland 4.0 example file, path unknown) and my WLife2D.RTF for examples. When done, Save this file as an .RTF file for use by the Help Compiler. # $ K + Contents This section should contain topic titles with their jump identifiers, formatted as HotSpots. OverviewHID_OVERVIEW # $ K + Overview Introduction, description of what the program does, etc. Topic ^Put cursor at left side of the Topic line above before running the
CreateHelpTopicFootnotes macro. |
This is the Word 6.0 version.
CreateHelpTopicFootnotes
Uses existing text and user input to create all footnotes required for a WinHelp file topic.
Sub MAIN
' Macro: CreateHelpTopicFootnotes 4-24-96
' Creates all the needed footnotes for a Topic in a WinHelp source file.
' Position cursor at the start of the topic heading before running macro
' Copyright (C)1996 Steven Whitney.
' Initially published by http://25yearsofprogramming.com.
' Published under GNU GPL (General Public License) Version 3, with ABSOLUTELY NO WARRANTY.
'
' Copy the topic heading for later use
ParaDown 1, 1 ' Select to end of paragraph
CharLeft 1, 1 ' Back up over paragraph mark (reduce selection)
EditCopy ' Copy to clipboard
StartOfLine ' Deselect
'
' Initialize contextstring$ to clipboard contents so it can be edited-down
' (not really useful)
' contextstring$ = "HID_" + Selection$()
'
' Get additional user input
contextstring$ = InputBox$("CONTEXT IDENTIFIER:", "Context Identifier", "HID_")
keywords$ = InputBox$("KEYWORDS OR PHRASES, separated with semicolons:", "Keywords", "")
'
' # This section creates the HID_ CONTEXT IDENTIFIER
'
contextstring$ = UCase$(contextstring$) ' to upper case
InsertFootnote .Reference = "#", .NoteType = 0
Insert contextstring$ ' paste the string into the footnote text
If ViewPage() Then ' return to document (footnote marker)
GoBack
Else
OtherPane
End If
'
' $ This section creates the topic's TITLE footnote (to be the same as the title text)
'
InsertFootnote .Reference = "$", .NoteType = 0
EditPaste ' paste from clipboard to footnote text
If ViewPage() Then ' return to document (footnote marker)
GoBack
Else
OtherPane
End If
'
' K This section creates the KEYWORDS footnote
'
InsertFootnote .Reference = "K", .NoteType = 0
Insert keywords$ ' paste the keywords text to footnote text
If ViewPage() Then ' return to document (footnote marker)
GoBack
Else
OtherPane
End If
'
' + This section creates the Browse sequence number (always 0)
'
InsertFootnote .Reference = "+", .NoteType = 0
Insert "0" ' insert "0" as footnote text
If ViewPage() Then ' return to document (footnote marker)
GoBack
Else
OtherPane
End If
End Sub
|
|
|
|
|
Copyright ©2012 Steven Whitney. Last modified Sun 07/29/2012 12:08:22 -0700. |
||