'ls2html: Option Public Option Explicit Option Compare Nocase %REM ls2html is a script library that contains functions to convert raw LotusScript code (in the form of a string or a file) to formatted HTML. The two main functions you'll use are ConvertFile and ConvertString (the other functions are mainly internal helper functions). These will convert a file or a string of LotusScript, using the internal default styles, which should approximate the look of code within the Notes/Domino Designer IDE. If you want to use your own custom styles, you can define your own style definition (with a StyleDef variable) and pass it in to the ConvertFileEx or ConvertStringEx functions. You can also use the last parameter of the ConvertFileEx and ConvertStringEx functions to specify the way that the resulting HTML is formatted. If you specify True or OUTPUT_CSS as the last parameter, then the HTML uses CSS styles to format the output (you can get the structure of the CSS " End If Print #outFile, "" Print #outFile, "" End If Print #outFile, START_SCRIPT '** line-by-line, convert the input file While Not Eof(inFile%) Line Input #inFile, rawLS Print #outFile, ConvertLine(rawLS) Wend '** and write some closing information when we're done Print #outFile, END_SCRIPT If Not (useCSS = OUTPUT_TAGS) Then Print #outFile, "" Print #outFile, "


" Print #outFile, "ls2html was brought to you by nsftools.com
" Print #outFile, "" Print #outFile, "" End If '** close the files Close inFile, outFile ConvertFileEx = True Exit Function displayError: Messagebox "Error " & Err & " Converting LS File: " & Error ConvertFileEx = False Exit Function End Function Function ConvertString (ls As String) As String '** A wrapper for the ConvertStringEx function, using common settings Dim style As StyleDef Call GetDefaultLsStyleDef(style) ConvertString = ConvertStringEx(ls, style, False) End Function Function ConvertStringEx (ls As String, style As StyleDef, useCSS As Integer) As String '** This is the function that does all the work of converting a LotusScript '** string to HTML. You specify the string to be converted as well as the '** StyleDef that should be used (could be the result of GetDefaultLsStyleDef '** for the default style) and the output type (OUTPUT_INLINE_STYLE (False), '** OUTPUT_CSS (True), or OUTPUT_TAGS). '** Keep in mind that adding all these formatting tags can easily increase the '** length of the original string by 5 to 10 times, so you risk exceeding the 64k '** String limit if you convert large pieces of script with this function Dim lineTerm As String Dim tempString As String Dim lastPos As Integer Dim pos As Integer On Error Goto displayError Call ResetGlobals() Call ResetStyleInfo(style, useCSS) lineTerm = GetLineTerminator(ls) ConvertStringEx = START_SCRIPT lastPos = 1 pos = Instr(lastPos, ls, lineTerm) While(pos > 0) tempString = Mid$(ls, lastPos, pos - lastPos) ConvertStringEx = ConvertStringEx & ConvertLine(tempString) & lineTerm lastPos = pos + Len(lineTerm) pos = Instr(lastPos, ls, lineTerm) Wend tempString = Mid$(ls, lastPos) ConvertStringEx = ConvertStringEx & ConvertLine(tempString) ConvertStringEx = ConvertStringEx & END_SCRIPT Exit Function displayError: Messagebox "Error " & Err & " Converting LS String: " & Error Exit Function End Function Function ConvertLine (Byval ls As String) As String '** This is the workhorse function that does all the conversion. '** It's set up to convert line-by-line, which should simplify the '** process of formatting large chunks of LotusScript. Pass in '** a line of raw Script (minus the line terminator), and get a '** formatted version of the Script in return. Dim i As Integer Dim thisChar As String Dim thisWord As String Dim fooString As String '** if this is a blank line, there's nothing to do If (Trim(ls) = "") Then 'ConvertLine = ls & "

" ConvertLine = ls Exit Function End If '** get rid of characters that will mess up the HTML Call ConvertInvalidHTML(ls) '** see if this starts a %REM block If (Left$(ls, Len(OPEN_COMMENT_BLOCK)) = OPEN_COMMENT_BLOCK) Then ConvertLine = ConvertLine & START_COMMENT & ls inCommentBlock = True Exit Function End If '** if we're already in a %REM block, all we have to do is check to see '* if it's over yet If (inCommentBlock) Then If ((Left$(SuperTrim(ls), Len(CLOSE_COMMENT_BLOCK)) = CLOSE_COMMENT_BLOCK) Or _ (Left$(SuperTrim(ls), Len(CLOSE_COMMENT_BLOCK2)) = CLOSE_COMMENT_BLOCK2)) Then ConvertLine = ConvertLine & ls & END_COMMENT inCommentBlock = False Else ConvertLine = ls End If Exit Function End If '** if we got this far, go through the line one character at a time (sorry '** about that) and process it For i = 1 To Len(ls) thisChar = Mid$(ls, i, 1) '** if this is a letter or a number, we can just keep going If (Instr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", thisChar) > 0) Then thisWord = thisWord & thisChar '** if we're inside a quote, all we really have to look for is the quoteEndChar Elseif inQuoteBlock Then If (thisChar = quoteEndChar) And (Mid$(ls, i, 1) <> quoteEndChar & quoteEndChar) Then '** whatever we're expecting as the terminator for the current quoted line '** doubled characters don't count inQuoteBlock = False quoteEndChar = "" ConvertLine = ConvertLine & thisWord & thisChar & END_QUOTE thisWord = "" Else '** no quoteEndChar, so keep going thisWord = thisWord & thisChar End If Else '** if we found a wordEndChar, we need to check the word we've built '** to see if it's a keyword If (Instr(wordEndChars, thisChar) > 0) Then If (Lcase(thisWord) = "rem") Then ConvertLine = ConvertLine & START_COMMENT & thisWord & Mid$(ls, i) & END_COMMENT thisWord = "" Exit For Elseif Iselement(operators(thisWord)) Then ConvertLine = ConvertLine & START_OPERATOR & thisWord & END_OPERATOR Elseif Iselement(keywords(thisWord)) Then ConvertLine = ConvertLine & START_KEYWORD & thisWord & END_KEYWORD Elseif Iselement(statements(thisWord)) Then ConvertLine = ConvertLine & START_STATEMENT & thisWord & END_STATEMENT Elseif Iselement(functions(thisWord & thisChar)) Then ConvertLine = ConvertLine & START_FUNCTION & thisWord & thisChar & END_FUNCTION thisChar = "" Elseif Iselement(functions(thisWord)) Then ConvertLine = ConvertLine & START_FUNCTION & thisWord & END_FUNCTION Elseif Iselement(constants(thisWord)) Then ConvertLine = ConvertLine & START_CONSTANT & thisWord & END_CONSTANT Elseif Iselement(classes(thisWord)) Then ConvertLine = ConvertLine & START_CLASS & thisWord & END_CLASS Elseif (Mid$(ls, i, 2) = "&#") Then '** this is a special case -- an escaped character in HTML is 5 characters, '** starting with &# and ending with a semi-colon (this is important, because '** that could be a converted &, <, or >) fooString = Mid$(ls, i, 5) If (fooString = "&") Then '** & is an ampersand (&) If (thisWord = "") Then ConvertLine = ConvertLine & START_OPERATOR & fooString & END_OPERATOR Else ConvertLine = ConvertLine & START_DATATYPE & thisWord & fooString & END_DATATYPE End If Elseif ((fooString = "<") Or (fooString = ">")) Then '** < and > are < and > ConvertLine = ConvertLine & thisWord & START_OPERATOR & fooString & END_OPERATOR Else ConvertLine = ConvertLine & thisWord & fooString End If i = i+4 thisChar = "" '** if we have a word that ends with a datatype character, mark it Elseif Iselement(datatypes(thisChar)) And (thisWord <> "") Then ConvertLine = ConvertLine & START_DATATYPE & thisWord & thisChar & END_DATATYPE thisChar = "" '** otherwise, we didn't find anything interesting, so we can just write the word Else ConvertLine = ConvertLine & thisWord End If '** check the single character we've got against the known LotusScript operators If (thisChar = "%") And (thisWord = "") Then '** skip this case, because "%" can start a keyword thisWord = thisChar Else If Iselement(operators(thisChar)) Then ConvertLine = ConvertLine & START_OPERATOR & thisChar & END_OPERATOR Else ConvertLine = ConvertLine & thisChar End If thisWord = "" End If '** quotation mark, pipe, or open brace starts a quoted segment Elseif (Instr("""|{", thisChar) > 0) Then inQuoteBlock = True ConvertLine = ConvertLine & thisWord & START_QUOTE & thisChar thisWord = "" If (thisChar = "{") Then quoteEndChar = "}" Else quoteEndChar = thisChar End If '** single quote starts a single-line comment Elseif (thisChar = "'") Then ConvertLine = ConvertLine & START_COMMENT & Mid$(ls, i) & END_COMMENT Exit For '** if nothing matches, just add the character to the word '** we're building and continue on Else thisWord = thisWord & thisChar End If End If Next '** don't forget the last word If Iselement(operators(thisWord)) Then ConvertLine = ConvertLine & START_OPERATOR & thisWord & END_OPERATOR Elseif Iselement(keywords(thisWord)) Then ConvertLine = ConvertLine & START_KEYWORD & thisWord & END_KEYWORD Elseif Iselement(statements(thisWord)) Then ConvertLine = ConvertLine & START_STATEMENT & thisWord & END_STATEMENT Elseif Iselement(functions(thisWord)) Then ConvertLine = ConvertLine & START_FUNCTION & thisWord & END_FUNCTION Elseif Iselement(constants(thisWord)) Then ConvertLine = ConvertLine & START_CONSTANT & thisWord & END_CONSTANT Elseif Iselement(classes(thisWord)) Then ConvertLine = ConvertLine & START_CLASS & thisWord & END_CLASS Else ConvertLine = ConvertLine & thisWord End If 'ConvertLine = ConvertLine & "
" End Function Sub ResetGlobals () '** reset the global state variables before starting a new conversion inCommentBlock = False inQuoteBlock = False quoteEndChar = "" End Sub Sub Initialize Call ResetGlobals '** these are all the characters that will end a word wordEndChars = " .,+-*/\^<>=()%!#@$&:" & Chr(9) '** populate the lists of LotusScript keywords (R4 and R5...I added '** the list of ND6 keywords at the end) datatypes("%") = "" 'datatypes("&") = "" '** we handle this as a special case in ConvertLine datatypes("!") = "" datatypes("#") = "" datatypes("@") = "" datatypes("$") = "" operators("+") = "" operators("-") = "" operators("*") = "" operators("/") = "" operators("\") = "" operators("=") = "" operators("<") = "" operators(">") = "" operators("(") = "" operators(")") = "" 'operators("&") = "" '** we handle this as a special case in ConvertLine operators(".") = "" operators(",") = "" operators("_") = "" operators(":") = "" operators("#") = "" operators("And") = "" operators("Eqv") = "" operators("Imp") = "" operators("Is") = "" operators("IsA") = "" operators("Like") = "" operators("Mod") = "" operators("Not") = "" operators("Or") = "" operators("Xor") = "" keywords("Access") = "" keywords("Alias") = "" keywords("Append") = "" keywords("Array") = "" keywords("As") = "" keywords("Base") = "" keywords("Binary") = "" keywords("Bind") = "" keywords("ByVal") = "" keywords("ByRef") = "" keywords("Compare") = "" keywords("Currency") = "" keywords("Declare") = "" keywords("Event") = "" keywords("Explicit") = "" keywords("Currency") = "" keywords("From") = "" keywords("GoSub") = "" keywords("GoTo") = "" keywords("Initialize") = "" keywords("Input") = "" keywords("Integer") = "" keywords("Len") = "" keywords("Lib") = "" keywords("List") = "" keywords("LMBCS") = "" keywords("LoadMsgFile") = "" keywords("Lock") = "" keywords("Long") = "" keywords("LSServer") = "" keywords("Me") = "" keywords("MsgDescription") = "" keywords("MsgText") = "" keywords("New") = "" keywords("NoCase") = "" keywords("NoPitch") = "" keywords("Option") = "" keywords("Output") = "" keywords("Pitch") = "" keywords("Preserve") = "" keywords("Private") = "" keywords("Public") = "" keywords("Published") = "" keywords("Random") = "" keywords("Read") = "" keywords("Remove") = "" keywords("Shared") = "" keywords("Single") = "" keywords("Static") = "" keywords("String") = "" keywords("Terminate") = "" keywords("Unicode") = "" keywords("Variant") = "" keywords("Write") = "" statements("Case") = "" statements("Class") = "" statements("Const") = "" statements("Dim") = "" statements("Do") = "" statements("Else") = "" statements("%Else") = "" statements("ElseIf") = "" statements("%ElseIf") = "" statements("End") = "" statements("%End") = "" statements("%ENDREM") = "" statements("Exit") = "" statements("For") = "" statements("ForAll") = "" statements("Function") = "" statements("Get") = "" statements("If") = "" statements("%If") = "" statements("Include") = "" statements("%Include") = "" statements("Let") = "" statements("Loop") = "" statements("Next") = "" statements("On") = "" statements("Property") = "" statements("ReDim") = "" statements("REM") = "" statements("%REM") = "" statements("Resume") = "" statements("Return") = "" statements("Select") = "" statements("Set") = "" statements("Step") = "" statements("Stop") = "" statements("Sub") = "" statements("Then") = "" statements("To") = "" statements("Type") = "" statements("Use") = "" statements("UseLSX") = "" statements("Wend") = "" statements("While") = "" statements("With") = "" functions("Abs") = "" functions("ACos") = "" functions("ActivateApp") = "" functions("ArrayAppend") = "" functions("ArrayGetIndex") = "" functions("ArrayReplace") = "" functions("Asc") = "" functions("ASin") = "" functions("ATn") = "" functions("ATn2") = "" functions("Beep") = "" functions("Bin") = "" functions("Bin$") = "" functions("Call") = "" functions("CCur") = "" functions("CDat") = "" functions("CDbl") = "" functions("ChDir") = "" functions("ChDrive") = "" functions("Chr") = "" functions("Chr$") = "" functions("CInt") = "" functions("CLng") = "" functions("Close") = "" functions("CodeLock") = "" functions("CodeLockCheck") = "" functions("CodeUnlock") = "" functions("Command") = "" functions("Command$") = "" functions("Cos") = "" functions("CreateLock") = "" functions("CreateObject") = "" functions("CSng") = "" functions("CStr") = "" functions("CurDir") = "" functions("CurDir$") = "" functions("CurDrive") = "" functions("CurDrive$") = "" functions("CVar") = "" functions("DataType") = "" functions("Date") = "" functions("Date$") = "" functions("DateNumber") = "" functions("DateSerial") = "" functions("DateValue") = "" functions("Day") = "" functions("Deftype") = "" functions("DefCur") = "" functions("DefDbl") = "" functions("DefInt") = "" functions("DefLng") = "" functions("DefSng") = "" functions("DefStr") = "" functions("DefVar") = "" functions("Delete") = "" functions("DestroyLock") = "" functions("Dir") = "" functions("Dir$") = "" functions("Doevents") = "" functions("Environ") = "" functions("Environ$") = "" functions("EOF") = "" functions("Erase") = "" functions("Erl") = "" functions("Err") = "" functions("Error") = "" functions("Error$") = "" functions("Evaluate") = "" functions("Execute") = "" functions("Exp") = "" functions("FileAttr") = "" functions("FileCopy") = "" functions("FileDateTime") = "" functions("FileLen") = "" functions("Fix") = "" functions("Format") = "" functions("Format$") = "" functions("Fraction") = "" functions("FreeFile") = "" functions("FullTrim") = "" functions("GetFileAttr") = "" functions("GetObject") = "" functions("GetThreadInfo") = "" functions("Hex") = "" functions("Hour") = "" functions("IMESetMode") = "" functions("IMEStatus") = "" functions("Input") = "" functions("Input$") = "" functions("InputB") = "" functions("InputB$") = "" functions("InputBP") = "" functions("InputBP$") = "" functions("InputBox") = "" functions("InputBox$") = "" functions("InStr") = "" functions("InStrB") = "" functions("InStrBP") = "" functions("InStrC") = "" functions("Int") = "" functions("IsArray") = "" functions("IsDate") = "" functions("IsDefined") = "" functions("IsElement") = "" functions("IsEmpty") = "" functions("IsList") = "" functions("IsNull") = "" functions("IsNumeric") = "" functions("IsObject") = "" functions("IsScalar") = "" functions("IsUnknown") = "" functions("Kill") = "" functions("LBound") = "" functions("LCase") = "" functions("LCase$") = "" functions("Left") = "" functions("Left$") = "" functions("LeftB") = "" functions("LeftB$") = "" functions("LeftBP") = "" functions("LeftBP$") = "" functions("LeftC") = "" functions("Len") = "" functions("LenB") = "" functions("LenBP") = "" functions("LenC") = "" functions("Line") = "" '** as in Line Input functions("ListTag") = "" functions("LOC") = "" functions("Lock") = "" functions("LOF") = "" functions("Log") = "" functions("LSet") = "" functions("LTrim") = "" functions("LTrim$") = "" functions("MessageBox") = "" functions("Mid") = "" functions("Mid$") = "" functions("MidB") = "" functions("MidB$") = "" functions("MidBP") = "" functions("MidBP$") = "" functions("MidC") = "" functions("Minute") = "" functions("MkDir") = "" functions("Month") = "" functions("MsgBox") = "" functions("Name") = "" functions("Now") = "" functions("Oct") = "" functions("Oct$") = "" functions("Open") = "" functions("Print") = "" functions("Put") = "" functions("Randomize") = "" functions("Reset") = "" functions("Right") = "" functions("Right$") = "" functions("RightB") = "" functions("RightB$") = "" functions("RightBP") = "" functions("RightBP$") = "" functions("RightC") = "" functions("RmDir") = "" functions("Rnd") = "" functions("Round") = "" functions("RSet") = "" functions("RTrim") = "" functions("RTrim$") = "" functions("Run") = "" functions("Second") = "" functions("Seek") = "" functions("SendKeys") = "" functions("SetFileAttr") = "" functions("Sgn") = "" functions("Shell") = "" functions("Sin") = "" functions("Sleep") = "" functions("Space") = "" functions("Space$") = "" functions("Spc") = "" functions("Sqr") = "" functions("Str") = "" functions("Str$") = "" functions("StrComp") = "" functions("StrCompare") = "" functions("StrConv") = "" functions("StrLeft") = "" functions("StrLeftBack") = "" functions("StrRight") = "" functions("StrRightBack") = "" functions("String") = "" functions("String$") = "" functions("Tab") = "" functions("Tan") = "" functions("Time") = "" functions("Time$") = "" functions("TimeNumber") = "" functions("TimeSerial") = "" functions("TimeValue") = "" functions("Timer") = "" functions("Today") = "" functions("Trim") = "" functions("Trim$") = "" functions("TypeName") = "" functions("UBound") = "" functions("UCase") = "" functions("UCase$") = "" functions("UChr") = "" functions("UChr$") = "" functions("Uni") = "" functions("Unlock") = "" functions("UString") = "" functions("UString$") = "" functions("Val") = "" functions("Weekday") = "" functions("Width") = "" functions("Write") = "" functions("Year") = "" functions("Yield") = "" '## Internal Constants ## constants("Empty") = "" constants("False") = "" constants("Nothing") = "" constants("Null") = "" constants("Pi") = "" constants("True") = "" '## %If Constants ## constants("WIN16") = "" constants("WIN32") = "" constants("WINNT") = "" constants("WIN95") = "" constants("WIN40") = "" constants("WINDOWS") = "" constants("HPUX") = "" constants("SOLARIS") = "" constants("UNIX") = "" constants("OS2") = "" constants("MAC") = "" constants("OLE") = "" constants("MAC68K") = "" constants("MACPPC") = "" '## Function Constants ## constants("ACLLEVEL_AUTHOR") = "" constants("ACLLEVEL_DEPOSITOR") = "" constants("ACLLEVEL_DESIGNER") = "" constants("ACLLEVEL_EDITOR") = "" constants("ACLLEVEL_MANAGER") = "" constants("ACLLEVEL_NOACCESS") = "" constants("ACLLEVEL_READER") = "" constants("ACLTYPE_MIXED_GROUP") = "" constants("ACLTYPE_PERSON") = "" constants("ACLTYPE_PERSON_GROUP") = "" constants("ACLTYPE_SERVER") = "" constants("ACLTYPE_SERVER_GROUP") = "" constants("ACLTYPE_UNSPECIFIED") = "" constants("ACTIONCD") = "" constants("ALIGN_CENTER") = "" constants("ALIGN_FULL") = "" constants("ALIGN_LEFT") = "" constants("ALIGN_NOWRAP") = "" constants("ALIGN_RIGHT") = "" constants("ASSISTANTINFO") = "" constants("ATTACHMENT") = "" constants("AUTHORS") = "" constants("COLOR_BLACK") = "" constants("COLOR_BLUE") = "" constants("COLOR_CYAN") = "" constants("COLOR_DARK_BLUE") = "" constants("COLOR_DARK_CYAN") = "" constants("COLOR_DARK_GREEN") = "" constants("COLOR_DARK_MAGENTA") = "" constants("COLOR_DARK_RED") = "" constants("COLOR_DARK_YELLOW") = "" constants("COLOR_GRAY") = "" constants("COLOR_GREEN") = "" constants("COLOR_LIGHT_GRAY") = "" constants("COLOR_MAGENTA") = "" constants("COLOR_RED") = "" constants("COLOR_WHITE") = "" constants("COLOR_YELLOW") = "" constants("DATABASE") = "" constants("DATETIMES") = "" constants("DB_REPLICATION_PRIORITY_HIGH") = "" constants("DB_REPLICATION_PRIORITY_LOW") = "" constants("DB_REPLICATION_PRIORITY_MED") = "" constants("DB_REPLICATION_PRIORITY_NOTSET") = "" constants("EFFECTS_EMBOSS") = "" constants("EFFECTS_EXTRUDE") = "" constants("EFFECTS_NONE") = "" constants("EFFECTS_SHADOW") = "" constants("EFFECTS_SUBSCRIPT") = "" constants("EFFECTS_SUPERSCRIPT") = "" constants("EMBED_ATTACHMENT") = "" constants("EMBED_OBJECT") = "" constants("EMBED_OBJECTLINK") = "" constants("EMBEDDEDOBJECT") = "" constants("ERRORITEM") = "" constants("EV_ALARM") = "" constants("EV_COMM") = "" constants("EV_MAIL") = "" constants("EV_MISC") = "" constants("EV_REPLICA") = "" constants("EV_RESOURCE") = "" constants("EV_SECURITY") = "" constants("EV_SERVER") = "" constants("EV_UNKNOWN") = "" constants("EV_UPDATE") = "" constants("FONT_COURIER") = "" constants("FONT_HELV") = "" constants("FONT_ROMAN") = "" constants("FORMULA") = "" constants("FT_DATABASE") = "" constants("FT_DATE_ASC") = "" constants("FT_DATE_DES") = "" constants("FT_FILESYSTEM") = "" constants("FT_FUZZY") = "" constants("FT_SCORES") = "" constants("FT_STEMS") = "" constants("FT_THESAURUS") = "" constants("HTML") = "" constants("ICON") = "" constants("ID_CERTIFIER") = "" constants("ID_FLAT") = "" constants("ID_HIERARCHICAL") = "" constants("LSOBJECT") = "" constants("MIME_PART") = "" constants("NAMES") = "" constants("NOTESLINKS") = "" constants("NOTEREFS") = "" constants("NOTES_DESKTOP_CLIENT") = "" constants("NOTES_FULL_CLIENT") = "" constants("NOTES_LIMITED_CLIENT") = "" constants("NUMBERS") = "" constants("OTHEROBJECT") = "" constants("OUTLINE_CLASS_DATABASE") = "" constants("OUTLINE_CLASS_DOCUMENT") = "" constants("OUTLINE_CLASS_FOLDER") = "" constants("OUTLINE_CLASS_FORM") = "" constants("OUTLINE_CLASS_FRAMESET") = "" constants("OUTLINE_CLASS_NAVIGATOR") = "" constants("OUTLINE_CLASS_PAGE") = "" constants("OUTLINE_CLASS_UNKNOWN") = "" constants("OUTLINE_CLASS_VIEW") = "" constants("OUTLINE_OTHER_FOLDERS_TYPE") = "" constants("OUTLINE_OTHER_UNKNOWN_TYPE") = "" constants("OUTLINE_OTHER_VIEWS_TYPE") = "" constants("OUTLINE_TYPE_ACTION") = "" constants("OUTLINE_TYPE_NAMEDELEMENT") = "" constants("OUTLINE_TYPE_NOTELINK") = "" constants("OUTLINE_TYPE_URL") = "" constants("PAGINATE_BEFORE") = "" constants("PAGINATE_DEFAULT") = "" constants("PAGINATE_KEEP_TOGETHER") = "" constants("PAGINATE_KEEP_WITH_NEXT") = "" constants("PICKLIST_CUSTOM") = "" constants("PICKLIST_NAMES") = "" constants("PICKLIST_RESOURCES") = "" constants("PICKLIST_ROOMS") = "" constants("PROMPT_OK") = "" constants("PROMPT_OKCANCELCOMBO") = "" constants("PROMPT_OKCANCELEDIT") = "" constants("PROMPT_OKCANCELEDITCOMBO") = "" constants("PROMPT_OKCANCELLIST") = "" constants("PROMPT_OKCANCELLISTMULT") = "" constants("PROMPT_PASSWORD") = "" constants("PROMPT_YESNO") = "" constants("PROMPT_YESNOCANCEL") = "" constants("QUERYCD") = "" constants("READERS") = "" constants("REPLICA_CANDIDATE") = "" constants("RICHTEXT") = "" constants("RULER_ONE_CENTIMETER") = "" constants("RULER_ONE_INCH") = "" constants("SEV_FAILURE") = "" constants("SEV_FATAL") = "" constants("SEV_NORMAL") = "" constants("SEV_WARNING1") = "" constants("SEV_WARNING2") = "" constants("SIGNATURE") = "" constants("SPACING_DOUBLE") = "" constants("SPACING_ONE_POINT_50") = "" constants("SPACING_SINGLE") = "" constants("STYLE_NO_CHANGE") = "" constants("TAB_CENTER") = "" constants("TAB_DECIMAL") = "" constants("TAB_LEFT") = "" constants("TAB_RIGHT") = "" constants("TARGET_ALL_DOCS") = "" constants("TARGET_ALL_DOCS_IN_VIEW") = "" constants("TARGET_NEW_DOCS") = "" constants("TARGET_NEW_OR_MODIFIED_DOCS") = "" constants("TARGET_NONE") = "" constants("TARGET_RUN_ONCE") = "" constants("TARGET_SELECTED_DOCS") = "" constants("TARGET_UNREAD_DOCS_IN_VIEW") = "" constants("TEMPLATE") = "" constants("TEMPLATE_CANDIDATE") = "" constants("TEXT") = "" constants("TRIGGER_AFTER_MAIL_DELIVERY") = "" constants("TRIGGER_BEFORE_MAIL_DELIVERY") = "" constants("TRIGGER_DOC_PASTED") = "" constants("TRIGGER_DOC_UPDATE") = "" constants("TRIGGER_MANUAL") = "" constants("TRIGGER_NONE") = "" constants("TRIGGER_SCHEDULED") = "" constants("UNAVAILABLE") = "" constants("UNKNOWN") = "" constants("USERDATA") = "" constants("USERID") = "" constants("VC_ALIGN_CENTER") = "" constants("VC_ALIGN_LEFT") = "" constants("VC_ALIGN_RIGHT") = "" constants("VC_ATTR_PARENS") = "" constants("VC_ATTR_PUNCTUATED") = "" constants("VC_ATTR_PERCENT") = "" constants("VC_FMT_ALWAYS") = "" constants("VC_FMT_CURRENCY") = "" constants("VC_FMT_DATE") = "" constants("VC_FMT_DATETIME") = "" constants("VC_FMT_FIXED") = "" constants("VC_FMT_GENERAL") = "" constants("VC_FMT_HM") = "" constants("VC_FMT_HMS") = "" constants("VC_FMT_MD") = "" constants("VC_FMT_NEVER") = "" constants("VC_FMT_SCIENTIFIC") = "" constants("VC_FMT_SOMETIMES") = "" constants("VC_FMT_TIME") = "" constants("VC_FMT_TODAYTIME") = "" constants("VC_FMT_YM") = "" constants("VC_FMT_YMD") = "" constants("VC_FMT_Y4M") = "" constants("VC_FONT_BOLD") = "" constants("VC_FONT_ITALIC") = "" constants("VC_FONT_STRIKEOUT") = "" constants("VC_FONT_UNDERLINE") = "" constants("VC_SEP_COMMA") = "" constants("VC_SEP_NEWLINE") = "" constants("VC_SEP_SEMICOLON") = "" constants("VC_SEP_SPACE") = "" constants("VIEWMAPDATA") = "" constants("VIEWMAPLAYOUT") = "" constants("VW_SPACING_DOUBLE") = "" constants("VW_SPACING_ONE_POINT_25") = "" constants("VW_SPACING_ONE_POINT_50") = "" constants("VW_SPACING_ONE_POINT_75") = "" constants("VW_SPACING_SINGLE") = "" classes("Button") = "" classes("Field") = "" classes("Navigator") = "" classes("NotesACL") = "" classes("NotesACLEntry") = "" classes("NotesAgent") = "" classes("NotesDatabase") = "" classes("NotesDateRange") = "" classes("NotesDateTime") = "" classes("NotesDbDirectory") = "" classes("NotesDocument") = "" classes("NotesDocumentCollection") = "" classes("NotesEmbeddedObject") = "" classes("NotesForm") = "" classes("NotesInternational") = "" classes("NotesItem") = "" classes("NotesLog") = "" classes("NotesMIMEEntity") = "" classes("NotesName") = "" classes("NotesNewsletter") = "" classes("NotesOutline") = "" classes("NotesOutlineEntry") = "" classes("NotesRegistration") = "" classes("NotesReplication") = "" classes("NotesRichTextItem") = "" classes("NotesRichTextParagraphStyle") = "" classes("NotesRichTextStyle") = "" classes("NotesRichTextTab") = "" classes("NotesSession") = "" classes("NotesTimer") = "" classes("NotesUIDatabase") = "" classes("NotesUIDocument") = "" classes("NotesUIView") = "" classes("NotesUIWorkspace") = "" classes("NotesView") = "" classes("NotesViewColumn") = "" classes("NotesViewEntry") = "" classes("NotesViewEntryCollection") = "" classes("NotesViewNavigator") = "" classes("ODBCConnection") = "" classes("ODBCQuery") = "" classes("ODBCResultSet") = "" '** new in Notes\Domino 6 keywords("Boolean") = "" keywords("Byte") = "" keywords("Charset") = "" functions("CBool") = "" functions("CByte") = "" functions("Implode") = "" functions("Join") = "" functions("Replace") = "" functions("Split") = "" functions("StrToken") = "" classes("JavaClass") = "" classes("JavaError") = "" classes("JavaMethod") = "" classes("JavaMethodCollection") = "" classes("JavaObject") = "" classes("JavaProperty") = "" classes("JavaPropertyCollection") = "" classes("JavaSession") = "" classes("NotesAdministrationProcesss") = "" classes("NotesColorObject") = "" classes("NotesDOMAttributeNode") = "" classes("NotesDOMCDATASectionNode") = "" classes("NotesDOMCharacterDataNode") = "" classes("NotesDOMCommentNode") = "" classes("NotesDOMDocumentFragmentNode") = "" classes("NotesDOMDocumentNode") = "" classes("NotesDOMDocumentTypeNode") = "" classes("NotesDOMElementNode") = "" classes("NotesDOMEntityNode") = "" classes("NotesDOMEntityReferenceNode") = "" classes("NotesDOMNamedNodeMap") = "" classes("NotesDOMNode") = "" classes("NotesDOMNodeList") = "" classes("NotesDOMNotationNode") = "" classes("NotesDOMParser") = "" classes("NotesDOMProcessingInstructionNode") = "" classes("NotesDOMTextNode") = "" classes("NotesDOMXMLDeclNode") = "" classes("NotesDXLExporter") = "" classes("NotesDXLImporter") = "" classes("NotesMIMEHeader") = "" classes("NotesNoteCollection") = "" classes("NotesReplicationEntry") = "" classes("NotesRichTextDocLink") = "" classes("NotesRichTextNavigator") = "" classes("NotesRichTextRange") = "" classes("NotesRichTextSelection") = "" classes("NotesRichTextTable") = "" classes("NotesSAXAttributeList") = "" classes("NotesSAXException") = "" classes("NotesSAXParser") = "" classes("NotesStream") = "" classes("NotesUIScheduler") = "" classes("NotesXMLProcessor") = "" classes("NotesXSLTransformer") = "" End Sub Sub ConvertInvalidHTML (ls As String) '** convert the characters that will give HTML problems ls = ReplaceSubstring(ls, "&", "&") ls = ReplaceSubstring(ls, "<", "<") ls = ReplaceSubstring(ls, ">", ">") End Sub Function ReplaceSubstring (Byval theString As String, find As String, replace As String) As String Dim pos As Integer pos = Instr(theString, find) Do While (pos > 0) theString = Left$(theString, pos - 1) & replace & Mid$(theString, pos + Len(find)) pos = Instr(pos + Len(replace), theString, find) Loop ReplaceSubstring = theString End Function Function GetLineTerminator (theString As String) As String '** figure out the line terminator character in this string If (Instr(theString, Chr(13) & Chr(10)) > 0) Then GetLineTerminator = Chr(13) & Chr(10) Elseif (Instr(theString, Chr(13)) > 0) Then GetLineTerminator = Chr(13) Elseif (Instr(theString, Chr(10)) > 0) Then GetLineTerminator = Chr(10) Elseif (Instr(theString, Chr(0)) > 0) Then GetLineTerminator = Chr(0) Else '** default to Chr(10) GetLineTerminator = Chr(10) End If End Function Function StyleDefToString (style As StyleDef) As String '** convert a StyleDef to a string you can use in a