Can you see the address in you adress bar something like www.google.com/File_Opened.pdf?
If yes, you can try the below code.
Makes sure the proxy is disabled on your system.
Let me know if this helps.
Regards,
Ankesh
If yes, you can try the below code.
Code:
'Create an object
Set WinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
If WinHttp Is Nothing Then Set WinHttp = CreateObject("WinHttp.WinHttpRequest")
WinHttp.Open "GET", "http://google.com/your_pdf_file.pdf", False
WinHttp.Send
arrArray = WinHttp.ResponseBody
Set WinHttp = Nothing
On Error Resume Next
Set oADO = CreateObject("ADODB.Stream")
If oADO Is Nothing Then
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTextFile = oFSO.OpenTextFile("c:\Documnet_i_want_to_save.pdf", 2, True)
sData = ""
sBuffer = ""
For iCount = 0 to UBound(arrArray)
oTextFile.Write Chr(255 And Ascb(Midb(arrArray,iCount + 1, 1)))
Next
oTextFile.Close
Else
oADO.Type = 1
oADO.Open
oADO.Write arrArray
oADO.SaveToFile "c:\Documnet_i_want_to_save.pdf", 2 'File on your local
oADO.Close
End If
Set oADO = Nothing
Set oTextFile = Nothing
Set oFSO = Nothing
Makes sure the proxy is disabled on your system.
Let me know if this helps.
Regards,
Ankesh