Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Highlight all instances of a word in MS-Word
Message
 
 
À
02/07/2008 12:04:24
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01328241
Message ID:
01328263
Vues:
7
>There is, at least in Word 2007. Here a macro I just recorded:
>
>  Selection.Find.ClearFormatting
>  Selection.Find.Replacement.ClearFormatting
>
>  Selection.Find.Replacement.Highlight = True ' THIS!!!!!!
>
>    With Selection.Find
>        .Text = "king"
>        .Replacement.Text = "king"
>        .Forward = True
>        .Wrap = wdFindContinue
>        .Format = True
>        .MatchCase = False
>        .MatchWholeWord = True
>        .MatchWildcards = False
>        .MatchSoundsLike = False
>        .MatchAllWordForms = False
>    End With
>    Selection.Find.Execute Replace:=wdReplaceAll
>
Worked great in Word 2003.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform