Hello ,
I need to use Ms access 2003 to populate a table with Incoming feed information that resides on a web application. The process to get this information is like follows
• Click a button on a form to open internet explorer and to navigate to the web application
• Enter user name and password … I like to have this information – the user name and password- on a text file somewhere on my computer that are feed into the fields- for security reasons
• After logging in I look for a hyperlink called [RISC] and click on it
• The next page after loading has a hyperlink called [data] and click on it
• This page has my information. It has many feed names. I am interested in the feeds that has [reformatted.latest.in] in the name of the feed.
• Now. Every feed name that has the [reformatted.latest.in] is a hyperlink that when you click it ,it will take you to the individual files for that feed. Two types of files , one is .txt and the other is .ok
• I need to gather the [feed name]. [File name], [Size], [Date].
It sound complicated but its not . I have some part of the code working . I don’t know if there is a better way . I really do appreceate any help
So its .. Login .. Click on RISC .. Click on data.. looping through feed names and finding [xxxx reformatted.latest.in] …Click on it … loop in to capture [File name], [Size], [Date]
My Code ===========================================
I need to use Ms access 2003 to populate a table with Incoming feed information that resides on a web application. The process to get this information is like follows
• Click a button on a form to open internet explorer and to navigate to the web application
• Enter user name and password … I like to have this information – the user name and password- on a text file somewhere on my computer that are feed into the fields- for security reasons
• After logging in I look for a hyperlink called [RISC] and click on it
• The next page after loading has a hyperlink called [data] and click on it
• This page has my information. It has many feed names. I am interested in the feeds that has [reformatted.latest.in] in the name of the feed.
• Now. Every feed name that has the [reformatted.latest.in] is a hyperlink that when you click it ,it will take you to the individual files for that feed. Two types of files , one is .txt and the other is .ok
• I need to gather the [feed name]. [File name], [Size], [Date].
It sound complicated but its not . I have some part of the code working . I don’t know if there is a better way . I really do appreceate any help
So its .. Login .. Click on RISC .. Click on data.. looping through feed names and finding [xxxx reformatted.latest.in] …Click on it … loop in to capture [File name], [Size], [Date]
My Code ===========================================
Code:
Private Sub Command0_Click()
'==== need help to login
Dim temp
Set o2 = CreateObject("internetexplorer.application")
o2.navigate "[URL unfurl="true"]https://fcdev.cibcwm.com/"[/URL] 'IE navigates to a webpage
o2.Visible = True
While o2.Busy: DoEvents: Wend
Set o = o2.Document.all.tags("A")
M = o.length: mySubmit = -1
'==== I wish i can find a more effecent way to find my link and click on it
For r = 0 To M - 1
If InStr(1, o.Item(r).innerHTML, "RISC", vbTextCompare) Then
o.Item(r).focus
o.Item(r).Click: Exit For
End If
Debug.Print o.Item(r).innerHTML
Debug.Print o.Item(r).innerText
Next
Set o = o2.Document.all.tags("A")
E = o.length: mySubmit = -1
For c = 0 To E - 1
If InStr(1, o.Item(c).innerHTML, "data", vbTextCompare) Then
o.Item(c).focus
o.Item(c).Click: Exit For
End If
Debug.Print o.Item(c).innerHTML
Debug.Print o.Item(c).innerText
Next
Set o = o2.Document.all.tags("A")
F = o.length: mySubmit = -1
For x = 0 To F - 1
If InStr(1, o.Item(x).innerHTML, "reformatted.latest.in", vbTextCompare) Then
o.Item(x).focus
Name1 = o.Item(x).innerText '=== Need help here to loop through all hyperlinks
Debug.Print o.Item(x).innerHTML
Debug.Print o.Item(x).innerText
o.Item(x).Click
End If
Debug.Print o.Item(x).innerHTML
Debug.Print o.Item(x).innerText
Next
o2.Quit
Set o2 = Nothing
End Sub