Dim fileName As String = "C:\vb\test.txt" 'shift-jisの場合 Dim encode As System.Text.Encoding = System.Text.Encoding.GetEncoding("shift_jis") 'utf-8の場合 'Dim encode As System.Text.Encoding = System.Text.Encoding.UTF8 Dim readBytes As Byte() readBytes = My.Computer.FileSystem.ReadAllBytes(fileName) Dim text As String text = encode.GetString(readBytes) text &= "あああああ" & vbNewLine & "いいいいい" Dim writeBytes As Byte() writeBytes = encode.GetBytes(text) My.Computer.FileSystem.WriteAllBytes(fileName, writeBytes, False)