04-23-2010, 09:18 PM
Hi
I tried to write this code but it did not work.can someone please suggest me howto verify a notepad is open and if Yes then close?
'Close notepad if it is open
I tried to write this code but it did not work.can someone please suggest me howto verify a notepad is open and if Yes then close?
'Close notepad if it is open
Code:
If Window("regexpwndtitle:=Notepad","regexpwndclass:=Notepad","is owned window:=False","is child window:=False").Exists Then
Window("regexpwndtitle:=Notepad","regexpwndclass:=Notepad","is owned window:=False","is child window:=False").Close
End If