![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi
I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
Ads |
#2
|
|||
|
|||
![]()
Am Thu, 2 Feb 2006 10:49:07 -0800 schrieb Pierre Scerri:
Pierre, I´d use the "Microsoft Internet Controls" to navigate to the site and get its content. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
#3
|
|||
|
|||
![]()
Hi Michael
Thank you for the reply. Can you point me to a small example please? Thanks again Pierre "Michael Bauer" wrote: Am Thu, 2 Feb 2006 10:49:07 -0800 schrieb Pierre Scerri: Pierre, I´d use the "Microsoft Internet Controls" to navigate to the site and get its content. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
#4
|
|||
|
|||
![]()
Am Fri, 3 Feb 2006 08:00:26 -0800 schrieb Pierre Scerri:
Private WithEvents IE As InternetExplorer Private Sub IE_DocumentComplete(ByVal pDisp As Object, URL As Variant) Debug.Print pDisp.Document.Body.innerText End Sub Private Sub Form_Load() Set IE = New InternetExplorer IE.Navigate2 "http://www.vboffice.net" End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi Michael Thank you for the reply. Can you point me to a small example please? Thanks again Pierre "Michael Bauer" wrote: Am Thu, 2 Feb 2006 10:49:07 -0800 schrieb Pierre Scerri: Pierre, I´d use the "Microsoft Internet Controls" to navigate to the site and get its content. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
#5
|
|||
|
|||
![]()
Hi Michael
Thanks a lot. It worked. Pierre "Michael Bauer" wrote: Am Fri, 3 Feb 2006 08:00:26 -0800 schrieb Pierre Scerri: Private WithEvents IE As InternetExplorer Private Sub IE_DocumentComplete(ByVal pDisp As Object, URL As Variant) Debug.Print pDisp.Document.Body.innerText End Sub Private Sub Form_Load() Set IE = New InternetExplorer IE.Navigate2 "http://www.vboffice.net" End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi Michael Thank you for the reply. Can you point me to a small example please? Thanks again Pierre "Michael Bauer" wrote: Am Thu, 2 Feb 2006 10:49:07 -0800 schrieb Pierre Scerri: Pierre, I´d use the "Microsoft Internet Controls" to navigate to the site and get its content. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
#6
|
|||
|
|||
![]()
Hi
The website I am trying to access requires a username and password which the website remembers, but it pops up a box to acknowledge them. I have been trying to bypass this by using the SENDKEYS "{ENTER}" command as follows: If IExplr Is Nothing Then Set IExplr = CreateObject("InternetExplorer.Application") IExplr.Navigate Url SENDKEYS "{ENTER}" Do ' wait till iexplore is done. Loop Until .ReadyState = READYSTATE_COMPLETE a = .Document.Body.innertext ' put the whole page into a string etc..... but it doesn't seem to work. I have tried putting the SENDKEYS in different places, but it doesn't help. Any ideas would be most welcome. Thanks Pierre "Pierre Scerri" wrote: Hi Michael Thanks a lot. It worked. Pierre "Michael Bauer" wrote: Am Fri, 3 Feb 2006 08:00:26 -0800 schrieb Pierre Scerri: Private WithEvents IE As InternetExplorer Private Sub IE_DocumentComplete(ByVal pDisp As Object, URL As Variant) Debug.Print pDisp.Document.Body.innerText End Sub Private Sub Form_Load() Set IE = New InternetExplorer IE.Navigate2 "http://www.vboffice.net" End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi Michael Thank you for the reply. Can you point me to a small example please? Thanks again Pierre "Michael Bauer" wrote: Am Thu, 2 Feb 2006 10:49:07 -0800 schrieb Pierre Scerri: Pierre, I´d use the "Microsoft Internet Controls" to navigate to the site and get its content. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
#7
|
|||
|
|||
![]()
Update
Ok I've sorted the username/password problem. Discovered the Headers:= parameter of webbrowser.navigate. The problem now is this: If IExplr Is Nothing Then Set IExplr = CreateObject("InternetExplorer.Application") With IExplr .Navigate Url:=Url, headers:="Authorization: Basic XXXXXX" & Chr$(13) & Chr$(10) Do ' wait till iexplore is done. Loop While .Busy a = .Document.Body.innertext ' put the whole page into a string ....rest of code Now this code is in a Sub which is called twice in a row with a different URL from the same website. The first url may be: http://fmywebsite.com/Rst/OPS/FEB/2CPT.HTM The second url may be: http://mywebsite.com/Rst/OPS/MAR/2CPT.HTM After the second call, 'a' is still the result of the first call. ie it does not get updated. This only happens when I first run the program. Subsequent double calls while the program is running, work properly. Also, sometimes, the Do Loop While .Busy exits and the data is not complete. Heeeeelp!!! "Pierre Scerri" wrote: Hi The website I am trying to access requires a username and password which the website remembers, but it pops up a box to acknowledge them. I have been trying to bypass this by using the SENDKEYS "{ENTER}" command as follows: If IExplr Is Nothing Then Set IExplr = CreateObject("InternetExplorer.Application") IExplr.Navigate Url SENDKEYS "{ENTER}" Do ' wait till iexplore is done. Loop Until .ReadyState = READYSTATE_COMPLETE a = .Document.Body.innertext ' put the whole page into a string etc..... but it doesn't seem to work. I have tried putting the SENDKEYS in different places, but it doesn't help. Any ideas would be most welcome. Thanks Pierre "Pierre Scerri" wrote: Hi Michael Thanks a lot. It worked. Pierre "Michael Bauer" wrote: Am Fri, 3 Feb 2006 08:00:26 -0800 schrieb Pierre Scerri: Private WithEvents IE As InternetExplorer Private Sub IE_DocumentComplete(ByVal pDisp As Object, URL As Variant) Debug.Print pDisp.Document.Body.innerText End Sub Private Sub Form_Load() Set IE = New InternetExplorer IE.Navigate2 "http://www.vboffice.net" End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi Michael Thank you for the reply. Can you point me to a small example please? Thanks again Pierre "Michael Bauer" wrote: Am Thu, 2 Feb 2006 10:49:07 -0800 schrieb Pierre Scerri: Pierre, I´d use the "Microsoft Internet Controls" to navigate to the site and get its content. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
#8
|
|||
|
|||
![]()
Am Thu, 9 Feb 2006 10:41:33 -0800 schrieb Pierre Scerri:
Why don´t you use the DocumentComplete event as shown? If that event fires *then* the download is complete and you can navigate to another URL. Also, a Do While loop needs 100% of your CPU time. That´s not a good idea even if it would work. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Update Ok I've sorted the username/password problem. Discovered the Headers:= parameter of webbrowser.navigate. The problem now is this: If IExplr Is Nothing Then Set IExplr = CreateObject("InternetExplorer.Application") With IExplr .Navigate Url:=Url, headers:="Authorization: Basic XXXXXX" & Chr$(13) & Chr$(10) Do ' wait till iexplore is done. Loop While .Busy a = .Document.Body.innertext ' put the whole page into a string ...rest of code Now this code is in a Sub which is called twice in a row with a different URL from the same website. The first url may be: http://fmywebsite.com/Rst/OPS/FEB/2CPT.HTM The second url may be: http://mywebsite.com/Rst/OPS/MAR/2CPT.HTM After the second call, 'a' is still the result of the first call. ie it does not get updated. This only happens when I first run the program. Subsequent double calls while the program is running, work properly. Also, sometimes, the Do Loop While .Busy exits and the data is not complete. Heeeeelp!!! "Pierre Scerri" wrote: Hi The website I am trying to access requires a username and password which the website remembers, but it pops up a box to acknowledge them. I have been trying to bypass this by using the SENDKEYS "{ENTER}" command as follows: If IExplr Is Nothing Then Set IExplr = CreateObject("InternetExplorer.Application") IExplr.Navigate Url SENDKEYS "{ENTER}" Do ' wait till iexplore is done. Loop Until .ReadyState = READYSTATE_COMPLETE a = .Document.Body.innertext ' put the whole page into a string etc..... but it doesn't seem to work. I have tried putting the SENDKEYS in different places, but it doesn't help. Any ideas would be most welcome. Thanks Pierre "Pierre Scerri" wrote: Hi Michael Thanks a lot. It worked. Pierre "Michael Bauer" wrote: Am Fri, 3 Feb 2006 08:00:26 -0800 schrieb Pierre Scerri: Private WithEvents IE As InternetExplorer Private Sub IE_DocumentComplete(ByVal pDisp As Object, URL As Variant) Debug.Print pDisp.Document.Body.innerText End Sub Private Sub Form_Load() Set IE = New InternetExplorer IE.Navigate2 "http://www.vboffice.net" End Sub -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi Michael Thank you for the reply. Can you point me to a small example please? Thanks again Pierre "Michael Bauer" wrote: Am Thu, 2 Feb 2006 10:49:07 -0800 schrieb Pierre Scerri: Pierre, I´d use the "Microsoft Internet Controls" to navigate to the site and get its content. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi I have a folder for which I have set the home page to point to a website that contains a timetable in the form of text. Is there any way that I can programattically extract this text from the folder itself? Thanks Pierre |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viewing the Read Page | Teelions | Outlook - Using Forms | 3 | January 30th 06 03:20 PM |
Saveas web page shows Appointment and Event Details | Robert Grimes | Outlook - Calandaring | 0 | January 30th 06 02:09 PM |
how do I set up a calendar as a web page? | VA rider | Outlook - General Queries | 1 | January 29th 06 09:50 AM |
Command button not working on read page | jbtempe | Outlook - Using Forms | 2 | January 13th 06 11:25 PM |
Send Web Page by Email (hyperlinks don't work) | John Reames | Outlook - General Queries | 0 | January 13th 06 09:03 PM |