Connect to Internet from Access?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JHB

    Connect to Internet from Access?

    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




  • deko

    #2
    Re: Connect to Internet from Access?

    > How to connect to the page?

    Dim ie As New InternetExplore r 'Reference: Microsoft Internet Controls
    strNav = [url]
    ie.Navigate strNav
    [color=blue]
    > How to get the text back?[/color]

    good question...


    Comment

    • MGFoster

      #3
      Re: Connect to Internet from Access?

      If the data is in an HTML table or list you can read the data. See the
      Access Help article "TransferTe xt Method" for more info.

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

      JHB wrote:[color=blue]
      > 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?[/color]

      Comment

      • JHB

        #4
        Re: Connect to Internet from Access?

        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.chi ldNodes.Item(It emNr).innerHTML
        Exit Sub
        fejl:
        MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
        End Sub



        "JHB" <joern_bea@remo veThis_tdcadsl. dk> skrev i en meddelelse
        news:41fa787f$0 $48620$edfadb0f @dread15.news.t ele.dk...[color=blue]
        > Hi.
        >
        >
        >
        > How is it possible to load raw text from an Internet page (html-format),[/color]
        to[color=blue]
        > MS-Access?
        >
        > My questions are:
        >
        > How to connect to the page?
        >
        > How to get the text back?
        >
        >
        >
        > Thanks in advance
        >
        > Jørn
        >
        >
        >
        >[/color]


        Comment

        • Tom

          #5
          Re: Connect to Internet from Access?

          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@remo veThis_tdcadsl. dk> wrote in message
          news:41fc0f9c$0 $48636$edfadb0f @dread15.news.t ele.dk...[color=blue]
          > 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.chi ldNodes.Item(It emNr).innerHTML
          > Exit Sub
          > fejl:
          > MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
          > End Sub
          >
          >
          >
          > "JHB" <joern_bea@remo veThis_tdcadsl. dk> skrev i en meddelelse
          > news:41fa787f$0 $48620$edfadb0f @dread15.news.t ele.dk...[color=green]
          > > Hi.
          > >
          > >
          > >
          > > How is it possible to load raw text from an Internet page (html-format),[/color]
          > to[color=green]
          > > MS-Access?
          > >
          > > My questions are:
          > >
          > > How to connect to the page?
          > >
          > > How to get the text back?
          > >
          > >
          > >
          > > Thanks in advance
          > >
          > > Jørn
          > >
          > >
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • JHB

            #6
            Re: Connect to Internet from Access?

            Hello Tom.

            Dim SideIHTMLFormat As Variant, ie As New InternetExplore r
            SideIHTMLFormat is a declared as variant and it stored all the text on the
            WEB-page = ie.Document.chi ldNodes.Item(It emNr)
            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" <tmiller@nospam .please> skrev i en meddelelse
            news:mVVKd.1437 $cl1.640@newsre ad3.news.pas.ea rthlink.net...[color=blue]
            > 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@remo veThis_tdcadsl. dk> wrote in message
            > news:41fc0f9c$0 $48636$edfadb0f @dread15.news.t ele.dk...[color=green]
            > > 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.chi ldNodes.Item(It emNr).innerHTML
            > > Exit Sub
            > > fejl:
            > > MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
            > > End Sub
            > >
            > >
            > >
            > > "JHB" <joern_bea@remo veThis_tdcadsl. dk> skrev i en meddelelse
            > > news:41fa787f$0 $48620$edfadb0f @dread15.news.t ele.dk...[color=darkred]
            > > > Hi.
            > > >
            > > >
            > > >
            > > > How is it possible to load raw text from an Internet page[/color][/color][/color]
            (html-format),[color=blue][color=green]
            > > to[color=darkred]
            > > > MS-Access?
            > > >
            > > > My questions are:
            > > >
            > > > How to connect to the page?
            > > >
            > > > How to get the text back?
            > > >
            > > >
            > > >
            > > > Thanks in advance
            > > >
            > > > Jørn
            > > >
            > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Tom

              #7
              Re: Connect to Internet from Access?

              Thanks, Jorn!!


              "JHB" <joern_bea@remo veThis_tdcadsl. dk> wrote in message
              news:41fccb20$0 $48726$edfadb0f @dread15.news.t ele.dk...[color=blue]
              > Hello Tom.
              >
              > Dim SideIHTMLFormat As Variant, ie As New InternetExplore r
              > SideIHTMLFormat is a declared as variant and it stored all the text on the
              > WEB-page = ie.Document.chi ldNodes.Item(It emNr)
              > 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" <tmiller@nospam .please> skrev i en meddelelse
              > news:mVVKd.1437 $cl1.640@newsre ad3.news.pas.ea rthlink.net...[color=green]
              > > 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@remo veThis_tdcadsl. dk> wrote in message
              > > news:41fc0f9c$0 $48636$edfadb0f @dread15.news.t ele.dk...[color=darkred]
              > > > 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.chi ldNodes.Item(It emNr).innerHTML
              > > > Exit Sub
              > > > fejl:
              > > > MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
              > > > End Sub
              > > >
              > > >
              > > >
              > > > "JHB" <joern_bea@remo veThis_tdcadsl. dk> skrev i en meddelelse
              > > > news:41fa787f$0 $48620$edfadb0f @dread15.news.t ele.dk...
              > > > > Hi.
              > > > >
              > > > >
              > > > >
              > > > > How is it possible to load raw text from an Internet page[/color][/color]
              > (html-format),[color=green][color=darkred]
              > > > to
              > > > > MS-Access?
              > > > >
              > > > > My questions are:
              > > > >
              > > > > How to connect to the page?
              > > > >
              > > > > How to get the text back?
              > > > >
              > > > >
              > > > >
              > > > > Thanks in advance
              > > > >
              > > > > Jørn
              > > > >
              > > > >
              > > > >
              > > > >
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • deko

                #8
                Re: Connect to Internet from Access?

                I'm curious what language it is (forgive my linguistic ignorance...)

                "Tom" <tmiller@nospam .please> wrote in message
                news:8C7Ld.1726 $Nn1.52@newsrea d1.news.pas.ear thlink.net...[color=blue]
                > Thanks, Jorn!!
                >
                >
                > "JHB" <joern_bea@remo veThis_tdcadsl. dk> wrote in message
                > news:41fccb20$0 $48726$edfadb0f @dread15.news.t ele.dk...[color=green]
                > > Hello Tom.
                > >
                > > Dim SideIHTMLFormat As Variant, ie As New InternetExplore r
                > > SideIHTMLFormat is a declared as variant and it stored all the text on[/color][/color]
                the[color=blue][color=green]
                > > WEB-page = ie.Document.chi ldNodes.Item(It emNr)
                > > 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" <tmiller@nospam .please> skrev i en meddelelse
                > > news:mVVKd.1437 $cl1.640@newsre ad3.news.pas.ea rthlink.net...[color=darkred]
                > > > 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@remo veThis_tdcadsl. dk> wrote in message
                > > > news:41fc0f9c$0 $48636$edfadb0f @dread15.news.t ele.dk...
                > > > > 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.chi ldNodes.Item(It emNr).innerHTML
                > > > > Exit Sub
                > > > > fejl:
                > > > > MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
                > > > > End Sub
                > > > >
                > > > >
                > > > >
                > > > > "JHB" <joern_bea@remo veThis_tdcadsl. dk> skrev i en meddelelse
                > > > > news:41fa787f$0 $48620$edfadb0f @dread15.news.t ele.dk...
                > > > > > Hi.
                > > > > >
                > > > > >
                > > > > >
                > > > > > How is it possible to load raw text from an Internet page[/color]
                > > (html-format),[color=darkred]
                > > > > to
                > > > > > MS-Access?
                > > > > >
                > > > > > My questions are:
                > > > > >
                > > > > > How to connect to the page?
                > > > > >
                > > > > > How to get the text back?
                > > > > >
                > > > > >
                > > > > >
                > > > > > Thanks in advance
                > > > > >
                > > > > > Jørn
                > > > > >
                > > > > >
                > > > > >
                > > > > >
                > > > >
                > > > >
                > > >
                > > >[/color]
                > >
                > >[/color]
                >
                >[/color]


                Comment

                • Tom

                  #9
                  Re: Connect to Internet from Access?

                  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 InternetExplore r.
                  That doesn't work!
                  3. In the expression, ie.Document.chi ldNodes.Item(It emNr).innerHTML , please
                  explain what "Item" is and how does one know what value to assign to ItemNr.

                  Thanks,

                  Tom


                  "JHB" <joern_bea@remo veThis_tdcadsl. dk> wrote in message
                  news:41fc0f9c$0 $48636$edfadb0f @dread15.news.t ele.dk...[color=blue]
                  > 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.chi ldNodes.Item(It emNr).innerHTML
                  > Exit Sub
                  > fejl:
                  > MsgBox ("Siden er ikke tilgængelig i øjeblikket, prøv senere!")
                  > End Sub
                  >
                  >
                  >
                  > "JHB" <joern_bea@remo veThis_tdcadsl. dk> skrev i en meddelelse
                  > news:41fa787f$0 $48620$edfadb0f @dread15.news.t ele.dk...[color=green]
                  > > Hi.
                  > >
                  > >
                  > >
                  > > How is it possible to load raw text from an Internet page (html-format),[/color]
                  > to[color=green]
                  > > MS-Access?
                  > >
                  > > My questions are:
                  > >
                  > > How to connect to the page?
                  > >
                  > > How to get the text back?
                  > >
                  > >
                  > >
                  > > Thanks in advance
                  > >
                  > > Jørn
                  > >
                  > >
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • JHB

                    #10
                    Re: Connect to Internet from Access?

                    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 InternetExplore r '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 InternetExplore r.



                    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.chi ldNodes.Item(It emNr).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.chi ldNodes.Item(1) .innerHTML



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



                    Jørn

                    "Tom" <tmiller@nospam .please> skrev i en meddelelse
                    news:dI8Ld.1787 $Nn1.760@newsre ad1.news.pas.ea rthlink.net...[color=blue]
                    > Jorn,
                    >
                    > Your version of Access must be a lot better than mine if this code works[/color]
                    as[color=blue]
                    > 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[/color]
                    InternetExplore r.[color=blue]
                    > That doesn't work!
                    > 3. In the expression, ie.Document.chi ldNodes.Item(It emNr).innerHTML ,[/color]
                    please[color=blue]
                    > explain what "Item" is and how does one know what value to assign to[/color]
                    ItemNr.[color=blue]
                    >
                    > Thanks,
                    >
                    > Tom
                    >[/color]


                    Comment

                    • JHB

                      #11
                      Re: Connect to Internet from Access?

                      Hello deko.

                      The language is, Danish *GG*

                      Jørn

                      "deko" <www.clearpoint systems.com@use _contact_form.c om> skrev i en
                      meddelelse news:FC7Ld.1789 3$5R.1944@newss vr21.news.prodi gy.com...[color=blue]
                      > I'm curious what language it is (forgive my linguistic ignorance...)
                      >[/color]


                      Comment

                      Working...