Hi
I built a small tool in MS Access using a Form.
When I click a button on this form, I want it to search for any opened Internet Explorer (IE) window at a specific url and then input some value into a field in the form of that HTML page's document. The HTML document has frames.
I got the code to find the IE but now I am trying to get to the Frame collection on that HTML document.
Can anyone help me?
Thanks,
P :oD
Here is the code I use to find the IE window
I built a small tool in MS Access using a Form.
When I click a button on this form, I want it to search for any opened Internet Explorer (IE) window at a specific url and then input some value into a field in the form of that HTML page's document. The HTML document has frames.
I got the code to find the IE but now I am trying to get to the Frame collection on that HTML document.
Can anyone help me?
Thanks,
P :oD
Here is the code I use to find the IE window
Code:
'finds an open IE site by checking the URL
Function GetOpenIEByURL(ByVal i_URL As String) As SHDocVw.InternetExplorer
Dim objShellWindows As New SHDocVw.ShellWindows
Dim obj As Object 'SHDocVw.InternetExplorer.iframes
'ignore errors when accessing the document property
On Error Resume Next
'loop over all Shell-Windows
For Each GetOpenIEByURL In objShellWindows
'if the document is of type HTMLDocument, it is an IE window
If TypeName(GetOpenIEByURL.Document) = "HTMLDocument" Then
'check the URL
If GetOpenIEByURL.Document.URL = i_URL Then
'we found the right window
'---------
'need code here to get to the frame collection
'....
'---------
MsgBox "we found the right window"
Exit Function
End If
End If
Next
End Function
Comment