5 messages in org.openoffice.fr.prog[prog] API OpenOffice 2.0.1 conversio...
FromSent OnAttachments
Xavier XGE. GUILLEMINEJun 15, 2006 5:20 am 
Pascal RobertJun 15, 2006 7:33 am 
Xavier XGE. GUILLEMINEJun 16, 2006 4:47 am 
Xavier XGE. GUILLEMINEJun 20, 2006 1:47 am 
Xavier XGE. GUILLEMINEJun 29, 2006 2:28 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[prog] API OpenOffice 2.0.1 conversion document word avec champs de fusions vers odtActions...
From:Xavier XGE. GUILLEMINE (Xavi@fr.adp.com)
Date:Jun 15, 2006 5:20:08 am
List:org.openoffice.fr.prog

Bonjour

Je rencontre des soucis avec l'API openOffice 2.0.1

Je souhaite transformer un document word contenant des champs de fusions en
document office .odt via l'API

je réalise le code suivant :

/** * Transform the documentUrl (Normally a .doc, perhaps any document support by * Open Office)into a odt document * * @param xMSF * @param documentURL as <code>/path/template.doc</code> * @return */

public void transform(XMultiServiceFactory xMSF, String documentURL)throws
OOException { if ( logger.isDebugEnabled() ){ logger.debug(new StringBuffer(128).append("Transform to .odt :
").append(documentURL).toString()); }

// Transformation into .odt XTextDocument docWord = OOFactory.createXTextDocument(xMSF, documentURL); // Saugegarde du document String nomDocSortie = new
StringBuffer(128).append(documentURL).append(OOFileManager.getDocExtension()).toString(); OORegistration reg = new OORegistration(); reg.storeDocument(docWord, documentURL, "StarOffice XML (Writer)",
nomDocSortie); if ( logger.isDebugEnabled() ){ logger.debug(new StringBuffer(128).append("End transformation to .odt :
").append(documentURL).toString()); } }

À mon grand étonnement le document généré perd la notion de champ de fusions,
alors que si je réalise cette opération en ouvrant le document word par
openOffice et que je le sauvegarde en .odt le document possède bien les champs
de fusions.

Merci pour votre aide

GUILLEMINE Xavier Prestataire GRENAT ADPGSI - MAINTENANCE Z2X Tél 02.51.13.85.32