Hello,
I have this code:
It works as intended, finds a MSIE window, sets focus on it, opens a new tab. However, if the window is minimised, it does not maximise it. How can I achieve this? Google has not been helpful.
I have this code:
Code:
Sub OpenBrowserLink(link)
Dim sh As Object, oWin As Object, IE As Object
Set sh = CreateObject("Shell.Application")
'Find an IE Window
For Each oWin In sh.Windows
If TypeName(oWin.Document) = "HTMLDocument" Then
Set IE = oWin
Exit For
End If
Next
AppActivate IE.Document.title, True
IE.navigate link, CLng(2048)
End Sub
It works as intended, finds a MSIE window, sets focus on it, opens a new tab. However, if the window is minimised, it does not maximise it. How can I achieve this? Google has not been helpful.