Thanks
Noted below is the code:
String Ls_wndw_title = Space(100)
long Ll_handle, Ll_lentitle, Ll_currwnd, Ll_parent, Ll_maxbuff = 100
ll_handle = GetActiveWindow()
ll_lentitle = GetWindowTextA( ll_handle, ls_wndw_title, ll_maxbuff)
IF PosA( Lower( ls_wndw_title), 'microsoft word') > 0 THEN
RETURN false
END IF
LL_CurrWnd = GetWindow(ll_handle, 0)
DO WHILE ll_currwnd > 0
// ll_parent = GetParentA(LL_CurrWnd)
ll_parent = GetWindow( ll_currwnd, 2)
ls_wndw_title = Space(100)
ll_lentitle = GetWindowTextA( ll_parent, ls_wndw_title, ll_maxbuff)
IF PosA( Lower( ls_wndw_title), 'microsoft word') > 0 THEN
RETURN false
END IF
ll_currwnd = ll_parent
LOOP
return true