Private Sub WriteToDocument(str As String, Optional setNick As String, Optional txtFont As String, Optional txtColor As String, Optional setBold As Boolean, Optional setItalic As Boolean, Optional setUnderline As Boolean, Optional setLineThrough As Boolean) Dim txtBold As String, txtItalic As String, txtUOTline As String, txtStart As String, txtEnd As String If InStr(Font, Chr$(32)) Then Font = Chr$(34) & Font & Chr$(34) If setBold = True Then txtBold = "bold" Else txtBold = "normal" End If If setItalic = True Then txtItalic = "italic" Else txtItalic = "normal" End If txtUOTline = "none" If setUnderline = True Then txtUOTline = Replace$(txtUOTline, "none", "") & "underline" & Chr$(32) End If If setLineThrough = True Then txtUOTline = Replace$(txtUOTline, "none", "") & "line-through" & Chr$(32) End If 'MsgBox txtUOTline If setNick <> "" Then txtStart = "" & txtNickname.Text & ": " End If txtStart = txtStart & "" txtEnd = "" Dim x Set x = IEtxtWhisper.Document.createElement("span") x.innerHTML = txtStart & str & txtEnd & "
" & frmJavaScript.myAnchor.Text IEtxtWhisper.Document.body.appendChild x 'IEtxtMain.Document.getElementById("chatmain").innerHTML = IEtxtMain.Document.getElementById("chatmain").innerHTML & txtStart & str & txtEnd & "
" & frmJavaScript.myAnchor.Text 'IEtxtMain.Document.getElementById("chatmain").innerHTML = IEtxtMain.Document.getElementById("chatmain").innerHTML 'frmJavaScript.Text1.Text IEtxtMain.Document.ParentWindow.ScrollBy 0, 50 End Sub