: I'm trying to take a simple text web site and save it to a file with the same format. My process now is to use the inet control, display the page on a label, frame, form, or richtext box (I've tried all methods). Some formating is still lost but it's tolerable. The problem is when I use the write method to write it to a text file, all formating is lost. if the web page is simple small text, it's tolerable, but if it contains a lot of text, the formatting is just too complicated to write a program to analyze it. Any suggestions? Thanks again to all who've helped.
:
: Tim
:
If it's a webpage, show it in the WebBrowser control. Don't use the WB control to retrieve the page unless you've found out how to get the entire, original source from it (the only thing I've discovered is that it seems .Document.OuterHTML is supposed to be it, but I've never tried it).
WebBrowser1.Navigate "about:blank" 'clear it
WebBrowser1.Document.Write "html code here"
Or, since I don't remember if INet gives you the data (above) or saves it to a file (below):
WebBrowser1.Navigate "savedfile.html"
If you're writing to a "text file", you don't get formatting. "Text files" don't support it. If it's ASCII data (html, rtf, text, etc.), the Print method should print it faithfully. Otherwise, if it's binary data (Word, Unicode, etc.), use Put.