I want to convert a dotx file to docx.

I tried the following for this. But there is allways an 
InvalidOperationException("You can't change the content type of a part.");
Is there any way with the api to do this?



for (PackagePart part : xmlTextExtractor.getDocument().getPackage().getParts()) 
{
     if 
(part.getContentType().equals("application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml"))
 {
      part.setContentType( 
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
     }
    }









---
Nutzen Sie freenet Mail optimal angepasst für Ihr iPhone, Android oder Nokia 
Handy auch von unterwegs.
Alle Infos und Download unter http://mail.freenet.de/mobile-email/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to