@Override
    public String getText() {
        StringBuilder sb = new StringBuilder();
        //handle main document
        List<PackagePart> pps =
                container.getPartsByContentType(XWPFRelation.DOCUMENT.getContentType());
        if (pps != null) {
            for (PackagePart pp : pps) {
                //likely only one, but why not...
                try {
                    handleDocumentPart(pp, sb);
                } catch (IOException e) {
                    LOG.warn("IOException handling document part", e);
                } catch (SAXException e) {
                    if (WriteLimitReachedException.isWriteLimitReached(e)) {
                        throw new RuntimeSAXException(e);
                    }
                    //swallow this because we don't actually call it
                    LOG.warn("SAXException handling document part", e);
                } catch (TikaException e) {
                    LOG.warn("ParseException handling document part", e);
                }
            }
        }
        //handle glossary document
        pps = container.getPartsByContentType(XWPFRelation.GLOSSARY_DOCUMENT.getContentType());

        if (pps != null) {
            for (PackagePart pp : pps) {
                //likely only one, but why not...
                try {
                    handleDocumentPart(pp, sb);
                } catch (IOException e) {
                    LOG.warn("IOException handling glossary document part", e);
                } catch (SAXException e) {
                    if (WriteLimitReachedException.isWriteLimitReached(e)) {
                        throw new RuntimeSAXException(e);
                    }
                    //swallow this because we don't actually call it
                    LOG.warn("SAXException handling glossary document part", e);
                } catch (TikaException e) {
                    LOG.warn("ParseException handling document part", e);
                }
            }
        }

        return sb.toString();
    }
Experimental class that is based on POI's XSSFEventBasedExcelExtractor
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/ooxml/xwpf/XWPFEventBasedWordExtractor.java