champagne_ch
06-02-2013, 03:25 AM
Hello,
I have an issue that has just arrisen with IE automation.
in brief.. the following code does not see all of the IE windows. In Fact currently it only sees 2 of 9.
Sub Main()
'Requires reference to Microsoft Internet Controls
Dim SWs As SHDocVw.ShellWindows, vIE As SHDocVw.InternetExplorer
'Establish link to IE application
Set SWs = New SHDocVw.ShellWindows
For Each vIE In SWs
Debug.Print "URL:'" & vIE.Name & "'"
Debug.Print "URL:'" & vIE.LocationURL & "'"
Next
Set SWs = Nothing
Set vIE = Nothing
End Sub
output is:
URL:'Windows Internet Explorer'
URL:''
URL:'Windows Internet Explorer'
URL:'LINK FOUND BUT CANNOT POST'
There are in fact 9 IE windows open. And i do mean windows not tabs.
N.B.> one of the returns has no URL.. however when I view the pages all do..
All was working as module within Outlook. however I did get several IE crashes. (which did not occur from access) I have thus put into VB6 with no reboot as yet.
Any ideas what may be causing this issue.
The reason I am using this loop through windows is I have a htmldoc that opens a 2nd window with links to data I want to extract. Data is only produced when link is clicked as is encypted/ decrypted via javascript within HTML. If there wasd another way to capture this second screen I would be happier to use it.
I hope somebody can assist.
I have an issue that has just arrisen with IE automation.
in brief.. the following code does not see all of the IE windows. In Fact currently it only sees 2 of 9.
Sub Main()
'Requires reference to Microsoft Internet Controls
Dim SWs As SHDocVw.ShellWindows, vIE As SHDocVw.InternetExplorer
'Establish link to IE application
Set SWs = New SHDocVw.ShellWindows
For Each vIE In SWs
Debug.Print "URL:'" & vIE.Name & "'"
Debug.Print "URL:'" & vIE.LocationURL & "'"
Next
Set SWs = Nothing
Set vIE = Nothing
End Sub
output is:
URL:'Windows Internet Explorer'
URL:''
URL:'Windows Internet Explorer'
URL:'LINK FOUND BUT CANNOT POST'
There are in fact 9 IE windows open. And i do mean windows not tabs.
N.B.> one of the returns has no URL.. however when I view the pages all do..
All was working as module within Outlook. however I did get several IE crashes. (which did not occur from access) I have thus put into VB6 with no reboot as yet.
Any ideas what may be causing this issue.
The reason I am using this loop through windows is I have a htmldoc that opens a 2nd window with links to data I want to extract. Data is only produced when link is clicked as is encypted/ decrypted via javascript within HTML. If there wasd another way to capture this second screen I would be happier to use it.
I hope somebody can assist.