| Subject: | Search and replace inm word |
| Posted by: | Cid Benac |
| Date: | Fri, 26 Dec 2008 |
Delphi 7 MSWord 2003/2007
Using TWordApplication and TWordDocument, I'm trying to do a search and replace in code. I got the bellow example from the vba forum, but obviously the last line doesn't compile. Anyone can fix it?
MyWAP.Selection.Range.Find.Text := 'Text to find';
MyWAP.Selection.Range.Find.Replacement.Text := 'Replaced text';
MyWAP.Selection.Range.Find.Wrap := wdFindContinue;
MyWAP.Selection.Range.Find.Execute Replace := wdReplaceAll ;
TIA
CB