

![]() | 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: |
4 messages in org.openoffice.fr.progRE: [prog] Problème très urgent .... ...| From | Sent On | Attachments |
|---|---|---|
| Cezame Concept | Mar 15, 2006 2:41 am | |
| emma...@fr.thalesgroup.com | Mar 15, 2006 8:08 am | |
| Cezame Concept | Mar 15, 2006 8:18 am | |
| emma...@fr.thalesgroup.com | Mar 15, 2006 8:31 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: | RE: [prog] Problème très urgent .... OLE oOWriter | Actions... |
|---|---|---|
| From: | Cezame Concept (ceza...@wanadoo.fr) | |
| Date: | Mar 15, 2006 8:18:39 am | |
| List: | org.openoffice.fr.prog | |
Merci
Sais tu comment faire une recherche sur une chaîne comprenant des caractères comme des parenthèses pas exemple .. il semble quil faille remplacer ce genre de caractères par des chaînes de type »\x » ou trouver quel sont les caractères a remplacer et par quoi ?
Encore merci ..
_____
De : emma...@fr.thalesgroup.com [mailto:emma...@fr.thalesgroup.com] Envoyé : mercredi 15 mars 2006 17:09 À : pr...@fr.openoffice.org Objet : RE: [prog] Problème très urgent .... OLE oOWriter
Bonjour,
Je pense qu'il suffit de regarder le contenu du résultat obtenu et de voir s'il
correspond à la chaîne recherchée.
Pour cela, faire oResultat.getString()
Emmanuel
-----Message d'origine----- De : Cezame Concept [mailto:ceza...@wanadoo.fr] Envoyé : mercredi 15 mars 2006 11:42 À : pr...@fr.openoffice.org Objet : [prog] Problème très urgent .... OLE oOWriter
Je rencontre un problème lorsque j'effectue une recherche 'une chaîne dans un document oOWriter ...
Je souhaiterai simplement connaître en retour si la chaîne a été trouvée ...
J'utilise cette procédure .. sous VB express 2005
Function Rechercher(ByVal sMots As String, ByVal sRespecterCasse As Boolean, ByVal sMotEntier As Boolean) As Boolean
Dim oResultat As Object
Dim oDispatcherLocal As Object
Dim oControleur As Object
oSel = oDocument.CurrentController.Frame
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 d'un style donné par SearchString
oJeCherche.SearchStyles = False
'Rechercher un texte similaire au texte cherché
oJeCherche.SearchSimilarity = False
oResultat = oDocument.findFirst(oJeCherche)
'If oResultat Then
' oControleur.select(oMonCurseur)
' Rechercher = True
'Else
' Rechercher = False
'End If
Rechercher = True
End Function
Comment completer cette function ?
Merci d'avance
----------------------------------------------------------------------------
----------- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte.







