求助大神,现在想用企业微信机器人发送消息,但是在网上找到的教程不知道怎么改,小白表示看不懂,,还请大神帮助。。
企业微信机器人 地址 https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=fdab73c1-5820-43bf-ba68-9cc0ff084557
网上找到的VBA程式
Dim Url As String
Const CorpID As String = "abc123456789" '企业在企业微信ID
Dim Secret As String
Const SendText As String = "{""touser"": ""成员ID"",""toparty"": ""部门ID"",""totag"": ""标签ID"",""msgtype"": ""text"",""agentid"": 1000040,""text"" : { ""content"": ""消息内容""},""safe"":0}"
Const ErrCode As String = """errcode"":0,""errmsg"":""ok"""
Function Token(CorpID As String, Secret As String) As String
'获取Token 提醒一天只能获取 2000次,最好获取后保存方便调用
Secret = "" '用于发送消息的应用Secret
Dim http
Set http = CreateObject("MSXML2.ServerXMLHTTP")
Url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" & CorpID & "&corpsecret=" & Secret & ""
http.Open "ge