By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,098 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,098 IT Pros & Developers. It's quick & easy.

Connect to Internet from Access?

P: n/a
JHB
Hi.

How is it possible to load raw text from an Internet page (html-format), to
MS-Access?

My questions are:

How to connect to the page?

How to get the text back?

Thanks in advance

Jørn


Nov 13 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
> How to connect to the page?

Dim ie As New InternetExplorer 'Reference: Microsoft Internet Controls
strNav = [url]
ie.Navigate strNav
How to get the text back?


good question...
Nov 13 '05 #2

P: n/a
If the data is in an HTML table or list you can read the data. See the
Access Help article "TransferText Method" for more info.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

JHB wrote:
Hi.

How is it possible to load raw text from an Internet page (html-format), to
MS-Access?

My questions are:

How to connect to the page?

How to get the text back?

Nov 13 '05 #3

P: n/a
JHB
Thanks, for replay, both of you.

I've got it.

Greetings Jørn

Sub HentSide(Adr As String, ItemNr As Integer)
On Error GoTo fejl
Dim PauseTime, Start, Finish, TotalTime
ie.Navigate Adr
PauseTime = 2
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
SideIHTMLFormat = ie.Document.childNodes.Item(ItemNr).innerHTML
Exit Sub
fejl:
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
End Sub

"JHB" <joern_bea@removeThis_tdcadsl.dk> skrev i en meddelelse
news:41***********************@dread15.news.tele.d k...
Hi.

How is it possible to load raw text from an Internet page (html-format), to MS-Access?

My questions are:

How to connect to the page?

How to get the text back?

Thanks in advance

Jørn

Nov 13 '05 #4

P: n/a
Tom
Greetings Jorn,

Is SideIHTMLFormat a string variable that stores all the text on the
webpage? It is not dimmed!

What is the english equivalent of HentSide?

What is the english equivalent of your error message?

Thanks!

Tom
"JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message
news:41***********************@dread15.news.tele.d k...
Thanks, for replay, both of you.

I've got it.

Greetings Jørn

Sub HentSide(Adr As String, ItemNr As Integer)
On Error GoTo fejl
Dim PauseTime, Start, Finish, TotalTime
ie.Navigate Adr
PauseTime = 2
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
SideIHTMLFormat = ie.Document.childNodes.Item(ItemNr).innerHTML
Exit Sub
fejl:
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
End Sub

"JHB" <joern_bea@removeThis_tdcadsl.dk> skrev i en meddelelse
news:41***********************@dread15.news.tele.d k...
Hi.

How is it possible to load raw text from an Internet page (html-format),

to
MS-Access?

My questions are:

How to connect to the page?

How to get the text back?

Thanks in advance

Jørn


Nov 13 '05 #5

P: n/a
JHB
Hello Tom.

Dim SideIHTMLFormat As Variant, ie As New InternetExplorer
SideIHTMLFormat is a declared as variant and it stored all the text on the
WEB-page = ie.Document.childNodes.Item(ItemNr)
HentSide = GetSide ,an user declared sub/ could also be a function
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!") =
"The server is not responding, try later"

Jørn

"Tom" <tm*****@nospam.please> skrev i en meddelelse
news:mV****************@newsread3.news.pas.earthli nk.net...
Greetings Jorn,

Is SideIHTMLFormat a string variable that stores all the text on the
webpage? It is not dimmed!

What is the english equivalent of HentSide?

What is the english equivalent of your error message?

Thanks!

Tom
"JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message
news:41***********************@dread15.news.tele.d k...
Thanks, for replay, both of you.

I've got it.

Greetings Jørn

Sub HentSide(Adr As String, ItemNr As Integer)
On Error GoTo fejl
Dim PauseTime, Start, Finish, TotalTime
ie.Navigate Adr
PauseTime = 2
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
SideIHTMLFormat = ie.Document.childNodes.Item(ItemNr).innerHTML
Exit Sub
fejl:
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
End Sub

"JHB" <joern_bea@removeThis_tdcadsl.dk> skrev i en meddelelse
news:41***********************@dread15.news.tele.d k...
Hi.

How is it possible to load raw text from an Internet page
(html-format), to
MS-Access?

My questions are:

How to connect to the page?

How to get the text back?

Thanks in advance

Jørn



Nov 13 '05 #6

P: n/a
Tom
Thanks, Jorn!!
"JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message
news:41***********************@dread15.news.tele.d k...
Hello Tom.

Dim SideIHTMLFormat As Variant, ie As New InternetExplorer
SideIHTMLFormat is a declared as variant and it stored all the text on the
WEB-page = ie.Document.childNodes.Item(ItemNr)
HentSide = GetSide ,an user declared sub/ could also be a function
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!") =
"The server is not responding, try later"

Jørn

"Tom" <tm*****@nospam.please> skrev i en meddelelse
news:mV****************@newsread3.news.pas.earthli nk.net...
Greetings Jorn,

Is SideIHTMLFormat a string variable that stores all the text on the
webpage? It is not dimmed!

What is the english equivalent of HentSide?

What is the english equivalent of your error message?

Thanks!

Tom
"JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message
news:41***********************@dread15.news.tele.d k...
Thanks, for replay, both of you.

I've got it.

Greetings Jørn

Sub HentSide(Adr As String, ItemNr As Integer)
On Error GoTo fejl
Dim PauseTime, Start, Finish, TotalTime
ie.Navigate Adr
PauseTime = 2
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
SideIHTMLFormat = ie.Document.childNodes.Item(ItemNr).innerHTML
Exit Sub
fejl:
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
End Sub

"JHB" <joern_bea@removeThis_tdcadsl.dk> skrev i en meddelelse
news:41***********************@dread15.news.tele.d k...
> Hi.
>
>
>
> How is it possible to load raw text from an Internet page (html-format), to
> MS-Access?
>
> My questions are:
>
> How to connect to the page?
>
> How to get the text back?
>
>
>
> Thanks in advance
>
> Jørn
>
>
>
>



Nov 13 '05 #7

P: n/a
I'm curious what language it is (forgive my linguistic ignorance...)

"Tom" <tm*****@nospam.please> wrote in message
news:8C***************@newsread1.news.pas.earthlin k.net...
Thanks, Jorn!!
"JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message
news:41***********************@dread15.news.tele.d k...
Hello Tom.

Dim SideIHTMLFormat As Variant, ie As New InternetExplorer
SideIHTMLFormat is a declared as variant and it stored all the text on the WEB-page = ie.Document.childNodes.Item(ItemNr)
HentSide = GetSide ,an user declared sub/ could also be a function
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!") =
"The server is not responding, try later"

Jørn

"Tom" <tm*****@nospam.please> skrev i en meddelelse
news:mV****************@newsread3.news.pas.earthli nk.net...
Greetings Jorn,

Is SideIHTMLFormat a string variable that stores all the text on the
webpage? It is not dimmed!

What is the english equivalent of HentSide?

What is the english equivalent of your error message?

Thanks!

Tom
"JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message
news:41***********************@dread15.news.tele.d k...
> Thanks, for replay, both of you.
>
> I've got it.
>
> Greetings Jørn
>
> Sub HentSide(Adr As String, ItemNr As Integer)
> On Error GoTo fejl
> Dim PauseTime, Start, Finish, TotalTime
> ie.Navigate Adr
> PauseTime = 2
> Start = Timer
> Do While Timer < Start + PauseTime
> DoEvents
> Loop
> SideIHTMLFormat = ie.Document.childNodes.Item(ItemNr).innerHTML
> Exit Sub
> fejl:
> MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
> End Sub
>
>
>
> "JHB" <joern_bea@removeThis_tdcadsl.dk> skrev i en meddelelse
> news:41***********************@dread15.news.tele.d k...
> > Hi.
> >
> >
> >
> > How is it possible to load raw text from an Internet page

(html-format),
> to
> > MS-Access?
> >
> > My questions are:
> >
> > How to connect to the page?
> >
> > How to get the text back?
> >
> >
> >
> > Thanks in advance
> >
> > Jørn
> >
> >
> >
> >
>
>



Nov 13 '05 #8

P: n/a
Tom
Jorn,

Your version of Access must be a lot better than mine if this code works as
you imply it does!! Besides Dimming SidelHTMLFormat there are other
problems.
1. Dim PauseTime, Start, Finish, TotalTime AS WHAT?
2. What is your code to define ie? You said Dim ie As New InternetExplorer.
That doesn't work!
3. In the expression, ie.Document.childNodes.Item(ItemNr).innerHTML, please
explain what "Item" is and how does one know what value to assign to ItemNr.

Thanks,

Tom
"JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message
news:41***********************@dread15.news.tele.d k...
Thanks, for replay, both of you.

I've got it.

Greetings Jørn

Sub HentSide(Adr As String, ItemNr As Integer)
On Error GoTo fejl
Dim PauseTime, Start, Finish, TotalTime
ie.Navigate Adr
PauseTime = 2
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
SideIHTMLFormat = ie.Document.childNodes.Item(ItemNr).innerHTML
Exit Sub
fejl:
MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
End Sub

"JHB" <joern_bea@removeThis_tdcadsl.dk> skrev i en meddelelse
news:41***********************@dread15.news.tele.d k...
Hi.

How is it possible to load raw text from an Internet page (html-format),

to
MS-Access?

My questions are:

How to connect to the page?

How to get the text back?

Thanks in advance

Jørn


Nov 13 '05 #9

P: n/a
JHB
Hello Tom.

Maybe mine version is better as yours, but I don't think so, (mine is Access
2000). *S*

I don't think you have read the whole thread?

But anyway: deko wrote:

Dim ie As New InternetExplorer 'Reference: Microsoft Internet Controls
strNav = [url]
ie.Navigate strNav

To set the references for Microsoft Internet Controls.

Open the code window: Chose Tools->References, (menuline), find the
"Microsoft Internet Controls" in the list, mark it, and then you set set/dim
ie As New InternetExplorer.

You can dim PauseTime, Start, Finish, TotalTime as long, date, variant, I
haven't special use for a particular type, only to pause the code a few
seconds, to get the page loaded.

Question 3.

Set a break point one line below:

SideIHTMLFormat = ie.Document.childNodes.Item(ItemNr).innerHTML

From the menu line chose View->Locals Window.

In the Locals Window expand "Me" find "ie" and expand it, find "Documents"
and expand it, find childNodes and expand it, then you'll see the "Item" and
then you can chose what number you have to put in, to get the side you want,
(when you have seen the value of the innerHTML. Remember item start by zero,
so if you want Item no. 2 you have to set: SideIHTMLFormat =
ie.Document.childNodes.Item(1).innerHTML

You can't know what value ItemNr does have, it depend of the WEB-page.

Jørn

"Tom" <tm*****@nospam.please> skrev i en meddelelse
news:dI****************@newsread1.news.pas.earthli nk.net...
Jorn,

Your version of Access must be a lot better than mine if this code works as you imply it does!! Besides Dimming SidelHTMLFormat there are other
problems.
1. Dim PauseTime, Start, Finish, TotalTime AS WHAT?
2. What is your code to define ie? You said Dim ie As New InternetExplorer. That doesn't work!
3. In the expression, ie.Document.childNodes.Item(ItemNr).innerHTML, please explain what "Item" is and how does one know what value to assign to ItemNr.
Thanks,

Tom

Nov 13 '05 #10

P: n/a
JHB
Hello deko.

The language is, Danish *GG*

Jørn

"deko" <www.clearpointsystems.com@use_contact_form.com> skrev i en
meddelelse news:FC*****************@newssvr21.news.prodigy.co m...
I'm curious what language it is (forgive my linguistic ignorance...)

Nov 13 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.