Hi, I am trying to use excel to extract data and have reached a roadblock when it comes to extracting website contents. The three things I would like to be able to do are:
1) Bring up an open internet browser (preferably Firefox but IE will do)
2) Select and copy entire webpage contents
3) Close the current tab
I have figured out a way to bring up IE (albeit roundabout), but cannot accomplish the other two objectives. Any help would be greatly appreciated. Here is my code thus far...
Public Sub Find_IE_Windows()
Dim Shell As Object
Dim IE As Object
Set Shell = CreateObject("Shell.Application")
For Each IE In Shell.Windows
If TypeName(IE.document) = "HTMLDocument" Then
IE.Navigate IE.LocationURL
End If
Next
End Sub
1) Bring up an open internet browser (preferably Firefox but IE will do)
2) Select and copy entire webpage contents
3) Close the current tab
I have figured out a way to bring up IE (albeit roundabout), but cannot accomplish the other two objectives. Any help would be greatly appreciated. Here is my code thus far...
Public Sub Find_IE_Windows()
Dim Shell As Object
Dim IE As Object
Set Shell = CreateObject("Shell.Application")
For Each IE In Shell.Windows
If TypeName(IE.document) = "HTMLDocument" Then
IE.Navigate IE.LocationURL
End If
Next
End Sub