/**********************Code**************************/ String inputfilepath = "test1.pptx"; PresentationMLPackage pptPackage = PresentationMLPackage.load(new java.io.File(inputfilepath)); ThemePart themeSlidePart = (ThemePart) pptPackage.getParts().getParts().get(new PartName("/ppt/theme/theme1.xml")); Theme themeOfSlides = themeSlidePart.getJaxbElement(); System.out.println("Theme of original PPT : " + XmlUtils.marshaltoString(themeOfSlides, true)); //Part to apply Starts here String outputfilepath = "test3.pptx"; PresentationMLPackage pptPackagetoApply = PresentationMLPackage.load(new java.io.File(outputfilepath)); ThemePart themeSlidePartToApply = (ThemePart) pptPackagetoApply.getParts().getParts().get(new PartName("/ppt/theme/theme1.xml")); System.out.println("Theme B4 : " + XmlUtils.marshaltoString(themeSlidePartToApply.getJaxbElement(), true)); themeSlidePartToApply.setJaxbElement(themeOfSlides); SaveToZipFile saver = new SaveToZipFile(pptPackagetoApply); saver.save(outputfilepath); /*******************************************************************/