Suraj Kumar Patra
Answered On : Jan 18th, 2012
Hi,
Try this one
Code
SystemUtil.CloseProcessByHwnd"Hwndvalue"
Exp:
SystemUtil.CloseProcessByHwnd"132638"
Login to rate this answer.
You can find all the instances of open excels using GetObject() or Desktop.ChildObjects method. Then iterate through the list of objects and find the required excel using some property (like excel title). Once the required excel is found, you can close that excel object.
Login to rate this answer.