>>I have a problem sending HTML containing an XML-file. I use the following code found on this site:
>>
>>oIE = CREATEOBJECT("InternetExplorer.Application")
>>oIE.Navigate("c:\xmlbest.htm")
>>oIE.Document.Forms(0).Submit.Click()
>>oIE.Visible = .T.
>>
>>It works sometimes, but i often get an error code saying that the document (oIE.Document) isn't a part of the object. What can I do?
>>
>
>
>The Navigate method is asynchronous. This means that if you're not careful, your next line of code might attempt to access an object that is not yet loaded. You need to poll oIE.ReadyState for the value 4 and then poll oIE.Document.ReadyState for the value "complete" before executing any further code.
>
>
>>Another question: after i have send the html-file i receive a confirmation file, which is an xml-file. I want to save the file from the code in Foxpro. Is there any code like oIE.SaveAs("") or something to save the current file viewed???
>
>oIE.ExecWb(4,0)
>
>will display the Save As dialog, but I am not sure if it is possible to pass a file name. Let us know if you find a way.
Wouldn't it be possible to extract the document.tostring or the form.outerhtml and write that using VFP's STRTOFILE(), or am I missing something obvious?