Function Encoding(text$) Dim i With CreateObject("ADODB.Stream") .Open: .Type = 2: .Charset = "utf-8" .WriteText text: .Position = 0: .Type = 1: i = .Read With CreateObject("Microsoft.XMLDOM").createElement("b64") .DataType = "bin.base64": .nodeTypedValue = i Encoding = Replace(Mid(.text, 5), vbLf, "") End With .Close End With End Function Function Decoding(b64$) Dim i With CreateObject("Microsoft.XMLDOM").createElement("b64") .DataType = "bin.base64": .text = b64 i = .nodeTypedValue With CreateObject("ADODB.Stream") .Open: .Type = 1: .Write i: .Position = 0: .Type = 2: .Charset = "utf-8" Decoding = .ReadText .Close End With End With End Function