Mike T
Mike T

Reputation: 57

Posting a copied picture directly to Amazon Chime from Excel

Afternoon all, kind of a specific request! I currently have a project that posts directly to Amazon Chime using the following code:

Sub MessageChime(WebHook As String, MessageContent As String)
    Dim oHttp As Object
    Dim body As String
    body = "{""Content"":""" + MessageContent + """}"
    Set oHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
    oHttp.Open "POST", WebHook, False
    oHttp.setRequestHeader "Content-type", "application/json"
    oHttp.send body
End Sub

It works a treat for sure. But i'm wondering, using the HTTP POST if it's possible to send a picture instead?

My thought process would be to post a portion of a sheet, directly as a picture to chime, but currently the code I'm using is only good for text! Does anyone have any ideas using any other means that this could be possible?

I know it's quite specific, but maybe somebody can give me some pointers? :) Many thanks

Upvotes: 0

Views: 270

Answers (0)

Related Questions