For Each ie In shellWindows
If InStr(1, ie.FullName, "IEXPLORE.EXE", vbTextCompare) <> 0 then
Window("hwnd:=" &ie.HWND).Maximize
End if
Next
这个方法明显可以,但是是最大化所有的ie,有点不完美~作者: 风雪夜归人 时间: 2009-9-9 12:31
Set shell = CreateObject("Shell.Application")
Set shellWindows = shell.Windows
'msgbox "started"
For Each ie In shellWindows
If InStr(1, ie.FullName, "IEXPLORE.EXE", vbTextCompare) <> 0 then
If Instr(1, Window("hwnd:=" &ie.HWND).GetROProperty("text"), "test.doc", vbTextCompare) <> 0 Then
Window("hwnd:=" &ie.HWND).Maximize
End If
End if
Next