Function Array_To_HTML_Table (TLines() As String, TableAlign As String, TableWidth As String, Border As Integer, CelsPerRow As Integer, Cel_Alignment As String) As String
' Important:
' This function takes PLAIN text as input not HTML!
Dim tmp As String
Dim indx As Integer
Dim inner_index As Integer
Dim CrLf As String
Dim q As String
Dim Table_Header As String
Dim sBorder As String
If Border = True Then sBorder = "BORDER" Else sBorder = ""
Function HTML_Underline (HTML As String) As String
HTML_Underline = "<U>" + HTML + "</U>"
End Function
Function ReadFile (sFileName As String) As String
On Error GoTo ReadFileError
Dim FF As Integer
Dim TmpStr As String
FF = FreeFile
Open sFileName For Input As #FF
TmpStr = Input$(LOF(FF), FF)
Close #FF
ReadFile = TmpStr
Exit Function
ReadFileError:
ReadFile = ""
Exit Function
End Function
Function Text_2_HTML (Text As String) As String
' Important:
' This function takes PLAIN text as input not HTML!
Dim tmp As String
Dim indx As Integer
Dim CrLf As String
Dim q As String
ReDim TLines(1 To 1) As String
q = Chr(34)
CrLf = Chr(13) + Chr(10)
TextToLines Text, TLines()
tmp = ""
For indx = LBound(TLines) To UBound(TLines)
tmp = tmp + TLines(indx) + "<BR>" + CrLf
Next indx
Text_2_HTML = tmp
End Function
Function Text_2_HTML_List (Text As String, Numbered As Integer) As String
' Important:
' This function takes PLAIN text as input not HTML!
Dim tmp As String
Dim indx As Integer
Dim CrLf As String
Dim q As String
Dim LstO As String, LstC As String
ReDim TLines(1 To 1) As String
q = Chr(34)
CrLf = Chr(13) + Chr(10)
TextToLines Text, TLines()
If Numbered = True Then
LstO = "<OL>"
LstC = "</OL>"
Else
LstO = "<UL>"
LstC = "</UL>"
End If
tmp = LstO
For indx = LBound(TLines) To UBound(TLines)
If TLines(indx) <> "" Then
tmp = tmp + "<LI>" + TLines(indx) + "<BR>" + CrLf
Else
tmp = tmp + "<BR>" + CrLf
End If
Next indx
'If Right(tmp, 6) = "<BR>" + CrLf Then
' tmp = Left(tmp, Len(tmp) - 6)
'End If
tmp = tmp + LstC
Text_2_HTML_List = tmp
End Function
Function Text_To_HTML_Table (Text As String, TableAlign As String, TableWidth As String, Border As Integer, CelsPerRow As Integer, Cel_Alignment As String) As String
' Important:
' This function takes PLAIN text as input not HTML!
Dim tmp As String
Dim indx As Integer
Dim inner_index As Integer
Dim CrLf As String
Dim q As String
Dim Table_Header As String
Dim sBorder As String
If Border = True Then sBorder = "BORDER" Else sBorder = ""