*/
public String getText()
{
try
{
WordToTextConverter wordToTextConverter = new WordToTextConverter();
HeaderStories hs = new HeaderStories( doc );
if ( hs.getFirstHeaderSubrange() != null )
wordToTextConverter.processDocumentPart( doc,
hs.getFirstHeaderSubrange() );
if ( hs.getEvenHeaderSubrange() != null )
wordToTextConverter.processDocumentPart( doc,
hs.getEvenHeaderSubrange() );
if ( hs.getOddHeaderSubrange() != null )
wordToTextConverter.processDocumentPart( doc,
hs.getOddHeaderSubrange() );
wordToTextConverter.processDocument( doc );
wordToTextConverter.processDocumentPart( doc,
doc.getMainTextboxRange() );
if ( hs.getFirstFooterSubrange() != null )
wordToTextConverter.processDocumentPart( doc,
hs.getFirstFooterSubrange() );
if ( hs.getEvenFooterSubrange() != null )
wordToTextConverter.processDocumentPart( doc,
hs.getEvenFooterSubrange() );
if ( hs.getOddFooterSubrange() != null )
wordToTextConverter.processDocumentPart( doc,
hs.getOddFooterSubrange() );
return wordToTextConverter.getText();
}
catch ( Exception exc )
{
throw new RuntimeException( exc );
}