Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Search And Replace problem
Message
De
04/11/1999 18:45:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00287249
Message ID:
00287251
Vues:
19
>I've run the macro generator and from the code that was generated is as follows.
>
>
>
>oWord.Selection.Find.ClearFormatting
>oWord.Selection.Find.Replacement.ClearFormatting
>WITH oWord.Selection.Find
>        .Text = tcSearchFor
>        .Replacement.Text = tcReplaceWith
>        .Forward = True
>        .Wrap = wdFindContinue
>        .Format = False
>        .MatchCase = False
>        .MatchWholeWord = False
>        .MatchWildcards = False
>        .MatchSoundsLike = False
>        .MatchAllWordForms = False
>EndWith
>
>the last line looks liki
>oWord.Selection.Find.Execute Replace:=wdReplaceAll
>
>
>It's nice that VB has named parameters but VFP does not. After doing a little research I found that Execute has 11 parameters. The 11th Parameter the Replace parameter can not be defined up the find block.
>
>So I endup with the following
>oWord.Selection.Find.Execute( ,,,,,,,,,,wdReplaceAll )
>
>Is there an easier way?
>
>TIA

You found it. That's it. At least you got it to work. A couple of years ago I was dealing with a Word function that had several undocumented parameters (this I found out from MS support eventually).
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform