4 messages in org.openoffice.fr.prog[prog] Problème très urgent .... OLE ...
FromSent OnAttachments
Cezame ConceptMar 15, 2006 2:41 am 
emma...@fr.thalesgroup.comMar 15, 2006 8:08 am 
Cezame ConceptMar 15, 2006 8:18 am 
emma...@fr.thalesgroup.comMar 15, 2006 8:31 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] Problème très urgent .... OLE oOWriterActions...
From:Cezame Concept (ceza@wanadoo.fr)
Date:Mar 15, 2006 2:41:52 am
List:org.openoffice.fr.prog

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