// Get the XWordCursor interface of our text cursor
XWordCursor xWordCursor = (XWordCursor) UnoRuntime.queryInterface(
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