I'm struggling to find VBA code that will create a cookie file in my windows cookie folder (C:\Users\username\AppData\Roaming\Microsoft\Windows\Cookies)
Thanks in advance.
Printable View
I'm struggling to find VBA code that will create a cookie file in my windows cookie folder (C:\Users\username\AppData\Roaming\Microsoft\Windows\Cookies)
Thanks in advance.
i am not familiar with the requirement.
just googled and found this.
fromCode:Sub test()
Dim t As String
With CreateObject("MSXML2.XMLHTTP")
.Open "get", "http://www.comparity.net/perl/form.pl", False
.setRequestHeader "Cookie", "one=foo;two=bar;"
.setRequestHeader "Cookie", "one=foo;two=bar;"
.send
t = .responseText
WriteTextFile "z:\test.html", t
Debug.Print .Status
Debug.Print t
End With
End Sub
Sub WriteTextFile(FileName, Text)
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(FileName, ForWriting, -2)
f.Write Text
f.Close
End Sub
http://objectmix.com/xml-soap/86831-...p-cookies.html
this may be get you started.
good luck.