14 messages in org.openoffice.fr.prog[prog] Re: Insertion texte dans tableau
FromSent OnAttachments
AlanJun 30, 2009 2:45 am 
Thibault VataireJun 30, 2009 3:47 am 
AlanJul 1, 2009 5:42 am 
Bernard MarcellyJul 2, 2009 2:18 am 
AlanJul 2, 2009 7:29 am 
Bernard MarcellyJul 2, 2009 2:18 pm 
AlanJul 3, 2009 12:29 am 
Thibault VataireJul 3, 2009 1:04 am.odt
AlanJul 6, 2009 12:26 am 
Thibault VataireJul 6, 2009 3:23 am 
AlanJul 6, 2009 6:29 am 
AlanJul 6, 2009 6:42 am 
AlanJul 7, 2009 3:26 am 
Thibault VataireJul 7, 2009 5:10 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] Re: Insertion texte dans tableauActions...
From:Alan (alan@antsys.fr)
Date:Jul 6, 2009 6:42:26 am
List:org.openoffice.fr.prog

Bon le copié/collé de la ligne du tableau fonctionne. Maintenant j'aimerais changer le texte de chaque ligne. En fait remplacer (@) par (numLigne)

Dim CellDest As Object, oCell as Object Dim oCurseur as Object, oText As Object Dim Replace As Object Replace = Doc.createReplaceDescriptor Replace.SearchString = "(@)" For index_row = 1 to nb_rows - 1 Replace.ReplaceString = "(" & index_row & ")" For index_col = 0 to nb_colonnes - 1 oCell = Table.getCellByPosition(index_col, index_row) oText = oCell.getText() oCurseur = oText.createTextCursor() oCurseur.gotoEnd(True) oCurseur.replaceAll(Replace) Next Next

Le problème vient du replaceAll. Il ne doit pas fonctionner avec le cursor. Pourtant on doit pouvoir remplacer du texte par un autre dans une sélection non ? Quelqu'un aurait une idée ?