0

I have a report in access that gets an image from a url when charged, for this purpose I use MSXML2.ServerXMLHTTP to get the url.

Here is the code used:

Dim sURL As String   
Dim v As Variant
v = Split(sURL, "/")(UBound(Split(sURL, "/")))

Dim obj As Object
Dim fl() As Byte
Set obj = CreateObject("MSXML2.ServerXMLHTTP")

With obj
    .Open "GET", sURL, False
    .Send
    fl = .Responsebody
End With

The problem I have is when in the execution arrives to the .send it exits from the method despite having some more code, giving me no errors but also not displaying the image in the report.

Do you know what may be the cause?

Thank you in advance.

braX
  • 11,506
  • 5
  • 20
  • 33
adrian
  • 97
  • 2
  • 12
  • Try to use Msxml2.XMLHTTP.6.0 instead of MSXML2.ServerXMLHTTP. Read this topic https://stackoverflow.com/questions/41026800/excel-vba-msxml2-xmlhttp-6-0-vs-msxml2-serverxmlhttp-6-0 – Vlado Feb 25 '20 at 13:57
  • Thanks for your answer, the problem is bacause the url is https instead of http, but I still can't make this method work with https urls. – adrian Feb 25 '20 at 15:23

0 Answers0