I'm trying to create in MS Access VBA a routine that sends the content of a XML file to an Extranet. This Web page is secured with a digital certificate, that requires password and a username and password to enter the Extranet. The method to use is "POST".

Imagine that the Extranet's URL is the following HTTPS://extranet.test.pt, and the page where i need to post the data is HTTPS://extranet.test.pt/postpage.asp.

When the send event is triggered, i need to enter the CriptoAPI Private Key, but then the code stalls and doesn't anything else. I send the code bellow.
Can anyone help me on this?


Dim oHttpPost As Object
Dim strFileName As String, strFileText As String
Dim intFileNo As Integer

strFileName = "XML_FILE.XSD"
intFileNo = FreeFile()
Open strFileName For Input As #intFileNo
strFileText = Input(LOF(intFileNo), intFileNo)
Close #intFileNo

Set oHttpPost = CreateObject("Microsoft.XMLHTTP")

oHttpPost.Open "POST", "https://extranet.test.pt/postpage.asp", False
oHttpPost.setrequestheader "Content-Type", "application/x-www-form-urlencoded"

oHttpPost.Send strFileText
strResponse = oHttpPost.ResponseText