#define TRUE .T. #define FALSE .F. #define GW_HWNDNEXT 2 #define GW_CHILD 5 *-------------------------------------------------------------------------- *-------------------------------------------------------------------------- procedure do_it() declare integer EnableWindow in win32api integer, integer local obj, hwnd obj = createobject('Word.Application') obj.Visible = TRUE hwnd = GetSystemWindow(obj.Caption) ** disable keyboard =EnableWindow(hwnd, 0) ?? 'word keyboard disabled' suspend && the processing =EnableWindow(hwnd, 1) ?? 'word keyboard enabled' endproc *--------------------------------------------------------------------------- function GetSystemWindow(_Title) declare integer GetWindow in Win32API INTEGER, INTEGER declare integer GetDesktopWindow in Win32API declare integer GetWindowText in Win32API as _GetWindowText INTEGER, STRING @, INTEGER return GetWindowHandle(_Title) endfunc *--------------------------------------------------------------------------- function GetWindowHandle(_title, Handle, Children) local n, WindowText Handle = GetWindow(iif(empty(Handle), GetDesktopWindow(), Handle), GW_CHILD) do while !empty(Handle) WindowText = GetWindowText(Handle) if( !empty(WindowText) ) if( at(_title, WindowText) == 1 ) return Handle endif endif if( Children ) n = GetWindowHandle(_title, Handle, Children) if( !empty(n) ) return n endif endif Handle = GetWindow(Handle, GW_HWNDNEXT) enddo return 0 endfunc *--------------------------------------------------------------------------->Does anybody know of a way to prevent the user from typing/clicking in Word while a complicated set of automation is happening. Preferably without having to make Word invisible.