Public Function GetMikod(city As String, street As String, House As String) As String
Dim Request As MSXML2.ServerXMLHTTP60
Dim TextBody As String
Dim Response As String
Set Request = New ServerXMLHTTP60
TextBody = "https://services.israelpost.co.il/zip_data.nsf/SearchZip?OpenAgent&Location=" & city & "&POB=&Street=" & street & "&House=" & House
Debug.Print TextBody
Request.Open "GET", TextBody, False
Request.send
Response = Request.responseText
If IsNumeric(Mid(Response, InStr(Response, "RES8") + 4, 7)) Then
GetMikod = Mid(Response, InStr(Response, "RES8") + 4, 7)
Else
GetMikod = "Error"
End If
End Function
Public Function TestGetMikod()
Debug.Print GetMikod("ירושלים", "בלפור", 2)
End Function