Thanks alot
peter
>>Can I open word like this
>>
>>
>>LOCAL o as word.application
>>oWord=CREATEOBJECT("Word.Application")
>>oDoc=oWord.Documents.Open("c:\vapps\vcpr3\temp\test.doc")
>>
>>
>>an highlight all instances of let's say the word King (whole word only)
>>
>>i can't find a way in word itself but there must be!
>>
>>Peter
>
>
>
>LOCAL oWord AS "Word.Application"
>oWord = CREATEOBJECT("Word.Application")
>oWord.Documents.Open("c:\vapps\vcpr3\temp\test.doc")
>
>oWord.Visible = .t.
>loSelection = oWord.ActiveWindow.ActivePane.SELECTION
>loSelection.Find.ClearFormatting()
>loSelection.Find.Replacement.Highlight = .t.
>
>WITH loSelection.Find
> .Text = "king"
> .Replacement.Text = "king"
> .Forward = .t.
> .Wrap = 1
> .Format = .t.
> .MatchCase = .f.
> .MatchWholeWord = .t.
> .MatchWildcards = .f.
> .MatchSoundsLike = .f.
> .MatchAllWordForms = .f.
>ENDWITH
>loSelection.Find.Execute(,,,,,,,,,,2)
>
Peter Cortiel