Function URLEncodeUTF8(str As String) As String Dim xml As Object Set xml = CreateObject("MSXML2.DOMDocument.6.0") ' UTF-8でテキストをエンコード Dim node As Object Set node = xml.createElement("tmp") node.DataType = "bin.hex" node.Text = StrConv(str, vbFromUnicode) ' UTF-8ではなくANSIになる場合は下記方法2が安全 URLEncodeUTF8 = node.Text End Function