Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find and highlight word in a word document
Message
De
08/10/2009 08:09:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Find and highlight word in a word document
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01428224
Message ID:
01428224
Vues:
89
i have an application which keeps tack of documents among other things.
one of the routine queries the database for documents containing a list of word like 'finance' and 'meltdown' and it will return a handfull of .docs with those words in it in a grid.
the use can select a line in the grid and the program will open the word doc in MSWord.

now it woud be helpful if alloccasions of the words 'finance' and 'meltdown' would be highlited.

this code:
.Selection.Find.ClearFormatting
With .Selection.Find
.Text = "of"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = True
EndWith
.Selection.Find.Execute

does it one at a time. Is there a way to highlite ALL?


Thanks


Peter
Peter Cortiel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform