DECLARE Long SendMessage IN WIN32API AS SendMessage_C ; Long hwnd, Long msg, String, Long nLen = SendMessage_C(oRTFControl.hWnd, 1119, REPLICATE(CHR(0),8), 0) ** 1119 = WM_USER+EM_GETTEXTLENGTHEXDepending on the size of the text, this was 10 to 800 times faster than using LEN(oRTFControl.Text) for me. Also note, that the DECLARE only needs to be called once. So you should not include it in your refresh event.