Sub test()
Getfentre
End Sub
Public Function Getfentre(Optional url As String = "") As Object
Dim objShell As Object, obj As Object
Set objShell = CreateObject("shell.application")
For Each obj In objShell.Windows
'test de la presence de IE dans les treads
Debug.Print "******************"
Debug.Print "type de document :" & TypeName(obj)
Debug.Print "type de document :" & TypeName(obj.document)
Debug.Print "fenetre :" & obj.Name
Debug.Print "titre :" & obj.locationNAME
Debug.Print "url :" & obj.locationurl
Next obj
End Function