Function ByteArray2Text(varByteArray) 'Convert byte array into a string with ADODB.Recordset Dim rs Const adLongVarChar = 201 Set rs = CreateObject("ADODB.Recordset") rs.Fields.Append "temp", adLongVarChar, LenB(varByteArray) rs.Open rs.AddNew rs("temp").AppendChunk varByteArray rs.Update ByteArray2Text = rs("temp") rs.Close Set rs = Nothing End Function Function ByteArray2Text(varByteArray) 'Convert byte array into a string with ADODB.Stream 'Data should be real plain text because binary data will be mangled Dim byt Const adTypeText = 2 Const adTypeBinary = 1 Set byt = CreateObject("ADODB.Stream") byt.Type = adTypeBinary byt.Open byt.Write varByteArray byt.Position = 0 byt.Type = adTypeText byt.CharSet = "us-ascii" ByteArray2Text = byt.ReadText byt.Close Set byt = Nothing End Function Function ByteArray2Text(varByteArray) 'Convert byte array into a string with VBScript '60kb = 2 seconds, 100kb = 5 seconds, 200kb = 25 seconds Dim strBuffer, lngCounter strData = "" strBuffer = "" For lngCounter = 0 to UBound(varByteArray) strBuffer = strBuffer & Chr(255 And Ascb(Midb(varByteArray,lngCounter + 1, 1))) 'Keep strBuffer at 1k bytes maximum If lngCounter Mod 1000 = 0 Then strData = strData & strBuffer strBuffer = "" End If Next ByteArray2Text = strData & strBuffer End Function