返回列表 上一主題 發帖

[發問] 使用excel vba上傳圖檔到line

[發問] 使用excel vba上傳圖檔到line

關於line notify應用, 請問要怎麼把圖檔送到line的群組裡面?
圖檔路徑是F:\test.png
我參考https://notify-bot.line.me/doc/en/ 官網的說明,
裡面有提到要用imagefile, 但仍不知如何下手
請各位前輩指教@@

附上原始碼
  1. Sub line_notify_圖片()   
  2.      '===================================
  3.     'Line訊息
  4.     '===================================
  5.     Dim oXML As Object
  6.    
  7.     Dim Token As String
  8.    
  9.     Dim URL As String
  10.    
  11.     '指定的Line Notify Token
  12.    
  13.     Token = "你的TOKEN"
  14.    
  15.     'Line Notify的傳送訊息網址
  16.        
  17.         Line_Message = "str test"
  18.    
  19.     URL = "https://notify-api.line.me/api/notify"

  20.     Set oXML = CreateObject("Microsoft.XMLHTTP")
  21.    
  22.     With oXML
  23.    
  24.         '使用同步傳輸
  25.    
  26.         .Open "POST", URL, 0
  27.    
  28.         '設定傳送封包Header
  29.    
  30.         .SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  31.    
  32.         .SetRequestHeader "Authorization", "Bearer " & Token
  33.    
  34.         '執行Ajax傳送
  35.         .send "message=" & Chr(10) & Line_Message
  36.         Debug.Print oXML.responseText
  37.    
  38.     End With
  39.    
  40.     '釋放物件資源
  41.    
  42.     Set oXML = Nothing
  43. End Sub
複製代碼

        靜思自在 : 為自己找藉口的人永遠不會進步。
返回列表 上一主題