I have a Make (Integromat) webhook and I want to send a PDF file via Excel VBA.
The PDF file is on my desktop path.
This is the code I have:
Is it possible to send a PDF to webhook with VBA ?
Thank you
The PDF file is on my desktop path.
This is the code I have:
VBA Code:
Public Sub SendPDF()
Dim URL As String
Dim Req As Object
Dim PdfFullPath As String
Set Req = CreateObject("WinHttp.WinHttpRequest.5.1")
On Error GoTo Er
PdfFullPath = "C:\Users\MyUserName\Desktop\MyPDF.pdf"
URL = "https://hook.make.com/xxxxxx?"
Req.Open "POST", URL, False
Req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
Req.Send
MsgBox Req.ResponseText
Exit Sub
Er:
End Sub
Is it possible to send a PDF to webhook with VBA ?
Thank you