donne moi 2 minutes.... je te pond ça les yeux fermés ;-)
> Merci Eddy,
> mais ce n'est pas ce que je cherche
>
> L'extraction du document word est ok
> j'ai une table essai comprenant
> avec 2 champs :
> mot, npage
> * exemple
> Je 2
> suis 2
> un 2
> extra 2
> - 2
> terrestre 2
> Jean 2
> DENIS 2
>
> Je veux éliminer les 6 premiers dans une boucle
> DO...du 1er au dernier
> lmot = ESSAI(le mot cherché)
> IF exist(lmot) ** dans le dictionnaire
> DELETE
> ENDIF
> ENDDO
> PACK
>
> Est-ce plus clair?
>
> eddymaue a pensé très fort :
>
>> Je ne suis pas sur d'avoir bien saisi
>>
>> bref un p'tit bout d'exemple pour faire Recheche/Remplacement
>>
>> en bleu ce que tu as à modifier
>>
>> Bonne chance
>>
>> ***********SEARCH AND REPLACE***************
>> set step on
>>
>> Public g_oWord
>> g_oWord = CREATEOBJECT("word.application")
>> g_oWord.documents.Open("TonDocument.docx")
>>
>> g_oWord.visible = .t.
>>
>> MESSAGEBOX("I will wait here while you create some text and such in the new
>> word document." ; + CHR(13) + "Click OK when you are ready to
>> proceed with the Search and Replace.", ;
>> 64, "READY TO PROCEED?")
>> SearchReplaceInDoc(g_oWord.activedocument)
>>
>> *************************
>> PROCEDURE SearchReplaceInDoc(tcDoc)
>> *************************
>> #DEFINE wdEvenPagesHeaderStory 6
>> #DEFINE wdPrimaryHeaderStory 7
>> #DEFINE wdEvenPagesFooterStory 8
>> #DEFINE wdPrimaryFooterStory 9
>> #DEFINE wdFirstPageHeaderStory 10
>> #DEFINE wdFirstPageFooterStory 11
>>
>> LOCAL loRange, loSection, loHeaderFooter, llCheck, lcOld, lcNew
>>
>> lcOld = "Retirer"
>> lcNew = "Essais"
>>
>> FOR EACH loRange IN tcDoc.StoryRanges
>> IF !INLIST(loRange.StoryType, wdEvenPagesHeaderStory,
>> wdPrimaryHeaderStory, ; wdEvenPagesFooterStory,
>> wdPrimaryFooterStory, wdFirstPageHeaderStory, ;
>> wdFirstPageFooterStory)
>> SearchReplaceInRange(loRange, lcOld, lcNew)
>>
>> DO WHILE !ISNULL(loRange.NextStoryRange)
>> loRange = loRange.NextStoryRange
>> SearchReplaceInRange(loRange, lcOld, lcNew)
>> ENDDO
>>
>> ENDIF
>> NEXT
>>
>> FOR EACH loSection IN tcDoc.Sections
>> FOR EACH loHeaderFooter IN loSection.Headers
>>
>> llCheck = loHeaderFooter.LinkToPrevious
>> IF NOT llCheck
>> SearchReplaceInRange(loHeaderFooter.RANGE, lcOld, lcNew)
>> ENDIF
>>
>> NEXT
>>
>> FOR EACH loHeaderFooter IN loSection.Footers
>>
>> llCheck = loHeaderFooter.LinkToPrevious
>> IF !llCheck
>> SearchReplaceInRange(loHeaderFooter.RANGE, lcOld, lcNew)
>> ENDIF
>>
>> NEXT
>> NEXT
>> ENDPROC
>>
>> *************************
>> PROCEDURE SearchReplaceInRange(tcRange, tcOld, tcNew)
>> *************************
>> tcRange.FIND.Execute(tcOld,.F.,.T.,.F.,.F.,.F.,.T.,0,.T.,tcNew,2)
>> ENDPROC
>>
>> Guy BONEMME a formulé ce lundi :
d'absorber...