Set objShellApp = CreateObject("Shell.Application")
Dim winFolder
For Each wFolder In objShellApp.Windows
On Error Resume Next
isFolder = wFolder.document.folder ' An IE window does not support ".document.folder". We get the first Windows Explorer window.
If Err = 0 Then
wFolder.Visible = True
Set winFolder = wFolder
Exit For
End If
Next
There must be a better way to distinguish between Windows-Explorer and Internet-Explorer.
I'd appreciate your help.