VBA调用JS网址转文字 & 获取下载文件名

2017-02-13  本文已影响51人  林万程

Function decodeURI(szInput)
Set js = CreateObject("MSScriptControl.ScriptControl")
js.Language = "JScript"
decodeURI = js.Eval("decodeURI('" & szInput & "')")
End Function

Function attfn(http)
attfn = Replace(decodeURI(http.getResponseHeader("Content-Disposition")), "attachment;filename=", "")
End Function

上一篇下一篇

猜你喜欢

热点阅读