Re: Webpage to a text file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Set references to shdocvw.dll and mshtml.dll in your project and try
something like this. This is air code, so be warned:

Dim x As New InternetExplorer
Dim y As HTMLDocument

x.navigate "http://www.microsoft.com";
Set y = x.document

Debug.Print y.body.innerText

- Kev

"WVM" <a@xxxxx> wrote in message
news:vppqj.79070$9w2.75222@xxxxxxxxxxxxxxxxxxxxxxxxx
|
| "DutchMaster11" <DutchMaster11@xxxxxxxxx> wrote in message
| news:d2eb6c18-2eb1-4a19-a02d-f136b9ccd3a1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| > On Feb 6, 12:18 pm, "WVM" <a...@xxxxx> wrote:
| >> Hi All,
| >>
| >> All i want to do is save a very basic webpage to a text file.
| >>
| >> i dont need to see the actual page download etc, but just need to click
a
| >> button and it will know what do do.
| >>
| >> i have looked at the inet control but cannot see a save as?
| >>
| >> can anyone help?
| >>
| >> Many thanks
| >
| > You will want to use the INET control...
| >
| > Dim S as string
| > S = Inet.OpenURL('http://www.alphacommunications.com";)
| >
| > 'Now, S$ has the webpage source code
| >
| > Dim Num as integer
| > Num=FreeFile()
| >
| > Open FILENAME for output as #num
| > print num, s
| > Close #Num
|
| Hi!
|
| I have had a quick play with yours, it does the job to a point but like
| you say it returns the html source code.
|
| is there away you can get it to just return the page text as shown on
| screen, rather then the workings behind it?
|
| Thanks
|
|


.


Quantcast