ADO(ActiveX Data Objects) 使う
Sub Sample1() Dim buf As String, Target As String Target = "D:\Work\UTF-8のテキスト.txt" With CreateObject("ADODB.Stream") .Charset = "UTF-8" .Open .LoadFromFile Target buf = .ReadText .Close MsgBox buf End With End Sub
ADO(ActiveX Data Objects) 使う
Sub Sample1() Dim buf As String, Target As String Target = "D:\Work\UTF-8のテキスト.txt" With CreateObject("ADODB.Stream") .Charset = "UTF-8" .Open .LoadFromFile Target buf = .ReadText .Close MsgBox buf End With End Sub