Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
List all internet explorer (or other) windows (and close them)
Hello everyone,
and Merry christmas :) I have a question regarding IE control from Excel. Let's say a user has to close all internet explorer windows that he did not create (or only the ones with a specific name), how could you select/list/close them? I have tried the getobject late binding but it does not work with IE applications... as for AppActivate it works well but the sendkeys Alt+F4 messes up with the numlock key and sometimes bugs. Thanks for any info ;) T D |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
List all internet explorer (or other) windows (and close them)
One method is to start a hidden instance of the Word application and take
advantage of its 'tasks' property. That will return a collection of running applications. The 'name' property for each task returns the friendly name (the name you would see in the title bar of the window as opposed to the process name which might be different). Limit your search to tasks which are visible and then use the InStr function to isolate those whose name property gives a string containing the string "Internet Explorer". Use the 'close' method of the task to close all the IE windows and then shut down the hidden instance of Word. Steve "The Dude" <f_com2°AT°yahoo°DOT°fr wrote in message ... Hello everyone, and Merry christmas :) I have a question regarding IE control from Excel. Let's say a user has to close all internet explorer windows that he did not create (or only the ones with a specific name), how could you select/list/close them? I have tried the getobject late binding but it does not work with IE applications... as for AppActivate it works well but the sendkeys Alt+F4 messes up with the numlock key and sometimes bugs. Thanks for any info ;) T D |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
List all internet explorer (or other) windows (and close them)
Steve you rule!
Thanks for the tip, it works great. Obvioulsy I had forgotten about the .quit at the end so I ended up with 15 instances of Winword, but I got to learn about the Late Binding method :) Thanks again :) "Steve Yandl" wrote: One method is to start a hidden instance of the Word application and take advantage of its 'tasks' property. That will return a collection of running applications. The 'name' property for each task returns the friendly name (the name you would see in the title bar of the window as opposed to the process name which might be different). Limit your search to tasks which are visible and then use the InStr function to isolate those whose name property gives a string containing the string "Internet Explorer". Use the 'close' method of the task to close all the IE windows and then shut down the hidden instance of Word. Steve "The Dude" <f_com2°AT°yahoo°DOT°fr wrote in message ... Hello everyone, and Merry christmas :) I have a question regarding IE control from Excel. Let's say a user has to close all internet explorer windows that he did not create (or only the ones with a specific name), how could you select/list/close them? I have tried the getobject late binding but it does not work with IE applications... as for AppActivate it works well but the sendkeys Alt+F4 messes up with the numlock key and sometimes bugs. Thanks for any info ;) T D |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Impossible to close excel without saving message in internet explorer | Excel Programming | |||
Close all internet explorer windows | Excel Programming | |||
Excel 2002 - Internet Explorer Windows opening up uncontrollably | Excel Discussion (Misc queries) | |||
Excel 2002 - Internet Explorer Windows opening up uncontrollably | Excel Worksheet Functions | |||
Close an Internet Explorer browser window | Excel Programming |