// Insert both in the document
mxDocText.insertTextContent ( mxDocCursor, xEntryContent, false );
mxDocText.insertTextContent ( mxDocCursor, xIndexContent, false );
// Get the XDocumentIndex interface of the Index
XDocumentIndex xDocIndex = (XDocumentIndex) UnoRuntime.queryInterface(
XDocumentIndex.class, xIndex );
// And call it's update method
xDocIndex.update();
}
catch (Exception e)
{
e.printStackTrace ( System.out );
}