

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
5 messages in org.openoffice.fr.prog[prog] Rechercher remplacer dans entete| From | Sent On | Attachments |
|---|---|---|
| Cezame Concept | Apr 26, 2006 4:58 am | |
| Cezame Concept | Apr 27, 2006 6:26 am | |
| Laurent Godard | Apr 27, 2006 6:34 am | |
| Cezame Concept | Apr 27, 2006 6:41 am | |
| Cezame Concept | Apr 27, 2006 7:17 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [prog] Rechercher remplacer dans entete | Actions... |
|---|---|---|
| From: | Cezame Concept (ceza...@wanadoo.fr) | |
| Date: | Apr 26, 2006 4:58:25 am | |
| List: | org.openoffice.fr.prog | |
Bonjour,
Désolé de revenir a la charge mais je rencontre un problème pour réaliser un rechercher / Remplacer dans un entête
Je suis entrain de développer une appli utilisant des modèles de documents
Je souhaite pouvoir remplacer des champs prédéfinis dans les entêtes du document lorsque jutilise des tableaux dans lentête et y place des champs prédéfinis jai un plantage je ne comprends pas pourquoi
Ci-dessous mon code sous VB .Net express
Function RechercherRemplacerToutPressePapier(ByVal sMots As String, ByVal sRespecterCasse As Boolean, ByVal sMotEntier As Boolean) As Long
Dim oResultat As Object Dim oDispatcherLocal As Object Dim oIndex As Integer Dim oControleur As Object
Dim Arguments(0) As Object oSel = oDocument.CurrentController.Frame Arguments(0) = MakePropertyValue("Hidden", False)
sMots = ConvertToAllowsString(sMots)
oDispatcherLocal = CreateUnoService("com.sun.star.frame.DispatchHelper") oMonTexte = oDocument.getText() oControleur = oDocument.CurrentController
oJeCherche = oDocument.createSearchDescriptor
'Definir la balise à rechercher dans le document OpenOffice Word oJeCherche.SearchString = sMots
'Distinguer les majuscules des minuscules dans la recherche oJeCherche.SearchCaseSensitive = sRespecterCasse
'Ne rechercher que des mots oJeCherche.SearchWords = sMotEntier
'Rechercher à reculons oJeCherche.SearchBackwards = False
'Faire une recherche avec la méthode des expressions régulières oJeCherche.SearchRegularExpression = True
'Rechercher des paragraphes dun style donné par SearchString oJeCherche.SearchStyles = False
'Rechercher un texte similaire au texte cherché oJeCherche.SearchSimilarity = False
oResultat = oDocument.findAll(oJeCherche)
For oIndex = 1 To oResultat.getCount() ' sélectionner la chaine de recherche oMonCurseur = oMonTexte.createTextCursorByRange(oResultat.getByIndex(oIndex - 1))
'Remplacement par le contenu du presse papier oControleur.select(oMonCurseur) oDispatcherLocal.executeDispatch(oSel, ".uno:Paste", "", 0, Arguments) Next
RechercherRemplacerToutPressePapier = oResultat.getCount()
End Function.
Est-ce que quelquun a déjà réalisé ceci ? Est ce un bug dans oO ?
Merci davance pour votre aide







