'Question: The generated txt cannot be imported into online banking. The final consideration is the encoding problem. Sure enough, modify the UTF-8 encoding to gb2313.
Dim filepath As String Dim fileName As String Dim OutputFile As String OutputFile = filepath + fileName + ". Txt" If Dir $ (OutputFile) <> "" Then Kill OutputFile End If Dim objStream As Variant
Set objStream = CreateObject ("ADODB.Stream " ) objStream.Type = 2 objStream.Mode = 3 ' objStream.Charset =" utf-8 " objStream.Charset =" gb2312 "' Set the encoding through Chartset. objStream.Open objStream.WriteText "OBSSSTART", 1 objStream.WriteText "OBSSEND", objStream.Close Set objStream = Nothing