WordprocessingMLPackage wml = WordprocessingMLPackage.load(new File("XYZ.docx")); Styles s = wml.getMainDocumentPart().getStyleDefinitionsPart().getJaxbElement(); for (Style style : styles.getStyle()) { if(style.getName.getVal().equals("Normal") { // ... } if(style.getName.getVal().equals("heading 1") { // ... } // prints the name of every style found in the document System.out.println(style.getName().getVal()); }