Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click Dim loConfiguration As CDO.Configuration = New CDO.Configuration Dim loField As ADODB.Fields Dim loMessage As CDO.Message = New CDO.Message Dim loStream As ADODB.Stream Dim lcCookie As String = "" Dim lcPassword As String = "transfo" Dim lcPostData As String = "" Dim lcUsername As String = "mfournier" Dim lnCounter As Integer = 0 Dim loASCIIEncoding As System.Text.Encoding = New System.Text.ASCIIEncoding Dim loByte() As Byte Dim loCookieCollection As System.Net.CookieCollection Dim loCookieContainer As System.Net.CookieContainer = New System.Net.CookieContainer Dim loStreamWebRequest As IO.Stream Dim loWebRequest As System.Net.HttpWebRequest Dim loWebResponse As System.Net.HttpWebResponse ...all the code here to post the data and receive the cookie For lnCounter = 0 To loCookieCollection.Count - 1 lcCookie = loCookieCollection.Item(lnCounter).Name If lcCookie = "LevelExtremeSession" Then lcCookie = loCookieCollection.Item(lnCounter).Value ' Define the cookie loField = loConfiguration.Fields loField(CDO.CdoConfiguration.cdoHTTPCookies).Value = "LevelExtremeSession=" + lcCookie + ";expires=Thu, 01-Jan-2008 00:00:01 GMT;path=/" End If Next ' Make sure we set the cookie loMessage.Configuration = loConfiguration ' Go get the page loMessage.CreateMHTMLBody("http://www.myurl.com/Detail.aspx", CDO.CdoMHTMLFlags.cdoSuppressNone, "", "") loStream = loMessage.GetStream() ' Save to file loStream.SaveToFile("D:\Test.mhtml") End SubSo, there is something with the loField(CDO.CdoConfiguration.cdoHTTPCookies).Value line. I just don't know what is wrong.