Re: Webpage to a text file
- From: "Kevin Provance" <casey@xxxxxxxxxxx>
- Date: Wed, 6 Feb 2008 18:45:31 -0500
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
|
|
.
- Follow-Ups:
- Re: Webpage to a text file
- From: WVM
- Re: Webpage to a text file
- From: Jeff Johnson
- Re: Webpage to a text file
- References:
- Webpage to a text file
- From: WVM
- Re: Webpage to a text file
- From: DutchMaster11
- Re: Webpage to a text file
- From: WVM
- Webpage to a text file
- Prev by Date: Re: newbie: how to avoid having return or space bar from activating bu
- Next by Date: Re: Back to VB6 and .NET
- Previous by thread: Re: Webpage to a text file
- Next by thread: Re: Webpage to a text file
- Index(es):