/ Published in: Delphi
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//ОбъÑвление function SimpleReplace(Tag: string; New:string):boolean; //ОпиÑание //Процедура поиÑка и замены проÑÑ‚Ñ‹Ñ… Ñтрок////////////////////////////////////////////////// function TForm1.SimpleReplace(Tag: string; New:string):boolean; begin SimpleReplace:=true; try MsWord.Selection.End:=0; MsWord.Selection.Start:=0; MsWord.Selection.Find.Forward:=true; MsWord.Selection.Find.Text:= Tag; if MsWord.Selection.Find.Execute then begin MsWord.Selection.Delete; MsWord.Selection.InsertAfter(New); SimpleReplace(Tag, New); end else SimpleReplace:=false; //if except SimpleReplace:=false; end;//try end; //End SimpleReplace////////////////////////////////////////////////////////////// //Ð ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Var="Text_To_Past"; SimpleReplace('text_to_replace', Var);//Замена текÑта