Hello Everyone,
I want to extract text present in header and footer.
As of now, I am doing something like this:
List<SectionWrapper> sectionWrappers = m_WordMLPackage.getDocumentModel().getSections();
for (SectionWrapper sw : sectionWrappers)
{
HeaderFooterPolicy hfp = sw.getHeaderFooterPolicy();
System.out.println("SECTION");
System.out.println("Headers:");
if (hfp.getDefaultHeader()!=null) System.out.println("-default");
HeaderPart hdp = hfp.getDefaultHeader();
System.out.println("Header part content : " + hdp.getContent());
List<Object> hdpList = hdp.getContent();
}
This gives me the content of the header. This returns a list of object, as seen above.
But how ...