LOCAL lnHandle, lnResult, laEnv[25] * Get the whandle for the current window lnHandle = _WonTop() * Get the environment settings for a text or program file opened for editing. lnResult = _EdGetEnv( lnHandle, @laEnv ) IF ( lnResult = 0 ) ; && Call to _EdGetEnv was unsuccesfuull OR EMPTY(laEnv[1]) && Empty file name RETURN ENDIF * laEnv[16] - WOrd Wrap, 1-Yes, 0-No laEnv[16] = IIF( laEnv[16]=1, 0, 1) lnResult = _EdSetEnv( lnHandle, @laEnv ) RETURN>I'm Using VFP7.0