Function ReadTextFile()Function ReadTextFile(FileName, CharSet) Const adTypeText =2 'Create Stream object Dim BinaryStream Set BinaryStream =CreateObject("ADODB.Stream") 'Specify stream type - we want To get binary data. BinaryStream.Type = adTypeText 'Specify charset For the source text (unicode) data. IfLen(CharSet) >0Then BinaryStream.CharSet = CharSet EndIf 'Open the stream BinaryStream.Open 'Load the file data from disk To stream object BinaryStream.LoadFromFile FileName 'Open the stream And get binary data from the object ReadTextFile = BinaryStream.ReadText End Function