Dim sData As String sData = Inet1.OpenURL(strURL) RichTextBox1.Text = sData Print #1, sData
Dim sRawData As String, sSJIS As String sRawData = Inet1.OpenURL(strURL) sSJIS = Replace(sRawData, "text/html; charset=EUC-JP", "text/html; charset=Shift_JIS") Print #1, sSJIS
Dim strURL As String strURL = "http://tv.nikkansports.com/tv.php?site=007&mode=06&category=g&area=025&template=time&sdate=20081226&lhour=24&shour=5&arg=05" '[Microsoft XML, v3.0]での実装例 With New MSXML2.XMLHTTP30 .open "GET", strURL, False '括弧が付かない事に注意 .send RichTextBox1.Text = .responseText End With
'通信部分(この部分は元質問のコードと同一) Dim sText As String sText = Inet1.OpenURL(strURL) 'EUC-JP に変換して保存する部分 'Microsoft ActiveX Data Objects 2.8 Library (2.5以上ならOK)を参照設定 With New ADODB.Stream .open .Type = adTypeText .Charset = "EUC-JP" .WriteText sText .SaveToFile strFileName, adSaveCreateOverWrite .Close End With