I have uploaded: HTMTL081.ZIP. This version replaces all previous versions HTMTLxxx. I propose the directory should be win3/winword The readme file follows: RTF to HTML converter DLL version 0.90 alpha. This package includes following files: HTML.DOT WinWord 2.0 template file including some styles for writing and some macros to handle document as HTML. HTML6.DOT WinWord 6.0 template file. RTFTOHTM.DLL The conversion DLL. RTFTOHTM.INI The inifile for the converter including good defaults. RTFTOHTM.LIB The import library for the DLL. RTFTOHTM.H Public interface of the DLL. HTMTOOLS.DOC Some documentation about the converter. HTMTOOLS.HTM Documentation converted to .HTM. RTF2HTM.EXE QuickWin application for converting files. RTF2HTM.C Source for above. RTF2HTM.MAK Makefile for above. README.TXT This file. The DLL exports one function: RTFtoHTM(inbuf,inlen,outbuf,outlen). See HTMTOOLS.DOC for documentation of the conversion function. This converter can do a conversion from the file or a buffer to the file or a buffer. All combinations are possible. There is WinWord template in the package. It demonstrates interfacing to the Word macro language (and to Basic). This version of the converter does its best to survive with RTF written by WinWord versions 2.0c and 6.0x. I haven't test it with any other RTF generators. There is also a small application written in C demonstrating the use of the converter from C language. Changes and corrections from 0.8x to 0.9x - The template file with some macros for WinWord 6.0. - Minor corrections to rtf2htm.exe. - Empty buffer handling corrected in converter. Changes and corrections from 0.70 to 0.8x - Local references (within one document) can be made by specifying Bookmarks. Bookmarks generate an anchor (). If the local references are done by pressing 'D' button in the toolbar, Word shows the bookmarks name (as invisible). This feature can not be used, if the old features are in use. - Jump button for local reference can be made by specifying Gotobutton. - Gotobutton generate an URL to local reference (xxx - URLs can be made as WinWord Annotations. - The contents of \fldrslt are to be printed into current destination. - Base style added for use within Header to produce tag. - List styles (UL,OL) can be nested. - LISTING style added. - Header info can be given by WinWord Summary Info or by creating First Page Header - WinWord tables now convert (somehow) to preformatted tab separated 'tables'. - All supported paragraph styles are now configurable (to the certain level). - Some of the System variables can be set via an AboutBox (question mark button). - One little program (checkbr.exe) added to check RTF consistency. - Several minor bugs corrected. Changes and corrections from 0.60 to 0.70 - RTFTOHTM.INI added. There are some variables in .INI file including line length proposals for preformatted and the rest of styles. - The tags added. - Some extra (unneeded)

tag generations removed. - The attribute values of and tags enclosed by double quotes. Some browsers and editors require this. Changes and corrections from 0.50 to 0.60 - Some entities have been removed. - Handling of \par\par correct now. Thanks to Robert Thompson to notice this bug. - Some internal structures changed to be more robust. - The function RTFtoHTM returns the length of the destination correctly. DISCLAIMER This alpha version is totally free, but I am very pleased if You tell me any ideas for developing further or problems in using it. Installation Copy HTML.DOT into WinWord directory, and RTFTOHTM.DLL somewhere in PATH (eg. WINWORD or WINDOWS). To begin the new document using this template, open New from File menu and choose HTML.DOT as document template. To attach HTML.DOT into old document, use Template... command from File menu. In Template dialog choose 'Attach Document to' HTML, and click 'Store new Macros and Glossaries as' 'With document Template'; click OK. This installs the styles into current document. To install the macros, use Format Style command. In Style dialog click Define, Merge, and choose html.dot; click From Template; click Close. Checkbr.exe Usage: checbr Checks the section consistency of RTF file. RTFTOHTM.INI If you choose to change .INI settings, RTFTOHTM.INI file must be in the same directory with the converter dll. If this .INI file doesn't exist, the converter uses internal defaults which are equivalent with following .INI settings: [System] ZoneMin = 64 ZoneMax = 80 GetStyles = 0 ButtonURL = 1 Bookmark = bkmk HtmlDir = D:\pub\txtsrv\testdocs Debug = 0 [Header] ;Process the RTF Info header ProcessInfo = 1 ;Don't process the RTF header section ProcessHead = 0 ;Get a title TitleOK = 1 SubjectOK = 0 AuthorOK = 0 KeywordsOK = 0 ;Get a document comment DoccommOK = 1 TitleTag = "\n"|"" SubjectTag = "\n"|"" AuthorTag = "\n"|"" KeywordTag = DoccommTag ="" [Styles] ;StyleName Begin End Para Line Interpret Normal = "\n

"| "\n

"| "\n

"| "
\n"| IPR_NONE Header = ""| ""| ""| ""| IPR_NONE Title = "\n"| "\n"| ""| ""| IPR_NOBREAK Link = "\n\n"| ""| ""| IPR_NOBREAK Base = "\n\n"| ""| ""| IPR_NOBREAK Heading 1 = "\n

"| "

\n"| ""| ""| IPR_NOBREAK Heading 2 = "\n

"| "

\n"| ""| ""| IPR_NOBREAK Heading 3 = "\n

"| "

\n"| ""| ""| IPR_NOBREAK Heading 4 = "\n

"| "

\n"| ""| ""| IPR_NOBREAK Heading 5 = "\n
"| "
\n"| ""| ""| IPR_NOBREAK Heading 6 = "\n
"| "
\n"| ""| ""| IPR_NOBREAK Address = "\n
\n"| "\n
\n"| "\n

"| "
\n"| IPR_BREAK BlockQuote = "\n

\n"|"\n
\n"|"\n

"| "
\n"| IPR_BREAK Preformat = "\n

\n"|      "\n
\n"| "\n\n"| "\n"| IPR_CRLF Listing = "\n\n"| "\n\n"| "\n"| "\n"| IPR_LISTING Unnum List = "\n"| "\n
  • "| "
    \n"| IPR_LIST Order List = "\n
      "| "\n
    "| "\n
  • "| "
    \n"| IPR_LIST HTML = ""| ""| "\n"| "\n"| IPR_HTML HR = "\n
    \n"| ""| ""| ""| IPR_NONE System section - ZoneMin and ZoneMax (numeric) Define the proposal for line break zone for most of the styles in resulting .HTM file. These variables do not affect to Preformatted and Listing styles. If one of these is zero, the converter ignores both of these variables. Anchor and Img tags may go over the limits. The converter doesn't break line within those tags. - GetStyles (Boolean 0 or 1). If 1, the converter gets style models from section [Styles] in RTFTOHTM.INI. - ButtonURL (Boolean 0 or 1). If 1, the new features according to the way specifying an URL to the hypertext link are in effect, otherwise the old method is. - Bookmark (text). Defines the bookmark prefix. - HtmlDir (dirpath). If present, defines the path to save the *.HTM files. If omitted, the converter uses the same directory where the *.doc document resides - Debug (Boolean 0 or 1). If 1, the converter produces some (internal) debugging info into .HTM file. Header Section - ProcessInfo (Boolean 0 or 1). If 1, The converter searches the {\info ...} section in .RTF file to produce section to resulting file. This information can be given by using File Summary Info command. - ProcessHead (Boolean 0 or 1). If 1, The converter searches the {\headerf ...} style in .RTF file to produce section to resulting file. Both or either of previous variables can be omitted (or 0). If both are 1, the converter uses ProcessInfo. - TitleOK (Boolean 0 or 1). If 1, Seraches document Title. - SubjectOK (Boolean 0 or 1). If 1, Seraches document Subject. - AuthorOK (Boolean 0 or 1). If 1, Seraches document Author. - KeywordsOK (Boolean 0 or 1). If 1, Seraches document Keywords. - DoccommOK (Boolean 0 or 1). If 1, Seraches document Comments. - TitleTag (text). Defines the begin and end markups for appropriate field. If the field is found, the converter concatenates first (to the left of vertical bar) string, the field contents, and last string. The tag can be omitted.If only the first part is omitted, vertical bar must be there as placeholder. - SubjectTag (text). As in previous. - AuthorTag (text). As in previous. - KeywordsTag (text). As in previous. - DoccommTag (text). As in previous. System section In this section the variable names refer to the appropriate style in WinWord. The value consists five parts: - Begin tag What the converter produces to beginning of this style. - End tag What the converter produces to end of this style. - Para What the converter uses as paragraph separator within this style. - Line What the converter uses as line separator within this style. - Interpret Tells, how the converter interprets the paragraph (\par), paragraph definition (\pard), and line (\line) tags from .RTF. These symbols can not be combined. - IPR_NONE: Nothing special. When the parser sees \par, it produces the paragraph mark appropriate to current style. - IPR_BREAK: This interpretation is essentially the same as IPR_NONE. - IPR_NOBREAK: This style can not contain any line breaking characters. - IPR_CRLF: This is mostly used in PRE. The entities are used, and paragraph and line breaks are as they are in .RTF file. - IPR_LISTING: This is essentially the same as IPR_PRE. The main reason for this is to give two different styles for 'preformatted' data. - IPR_HTML: This is mandatorial interpretation. When this is in effect, the text read from .RTF file is produced to resulting file as is. No entity translations is made. - IPR_LIST: This interpretation is made for nestable lists and menus. Any ideas or problems? Email to: Name: Jorma Hartikka Senior Programmer Analyst Org: VTKK Government Systems ltd/Information Systems. Email: Jorma.Hartikka@csc.fi