XWordCursor.class, mxDocCursor );
// Skip the first four words of this sentence and select the fifth
xWordCursor.gotoNextWord( false );
xWordCursor.gotoNextWord( false );
xWordCursor.gotoNextWord( false );
xWordCursor.gotoNextWord( false );
xWordCursor.gotoNextWord( true );
// Use the XSimpleText interface to insert a word at the current cursor
// location, over-writing
// the current selection (the fifth word selected above)
mxDocText.insertString ( xWordCursor, "old ", true );