| **Navigation:**  [[templates.htm|Templates]] > Guide to all Templates > [[additional libraries and templates.htm|Additional Libraries and Templates]] > Rich Text Template Support - Overview >====== ReplaceRTF code template ====== | [[redortf code template.htm|{{btn_prev_n.gif|Previous page}}]][[additional libraries and templates.htm|{{btn_home_n.gif|Return to chapter overview}}]][[savertffield code template.htm|{{btn_next_n.gif|Next page}}]] | | || {{notebox.jpg|NoteBox.jpg}} **This template (and its associated code templates) has been deprecated, and is now replaced by the [[tplcontrolrtf.htm|RTF Text Control]] template.** The ReplaceRTF code template is used to do a Find and Replace search option within the rich text control. This template calls the Replace method. The string (or variable containing a string) to search for and the string (or variable containing a string) to replace with is passed to this method. If these parameters are omitted the Find and Replace dialog will appear. ** Prototype:** **Replace( [**//FindText//**], [**//ReplaceText//**] )** **Example method calls:** **! Using Variables** **loc:position = oRTF_RTFTextBox.Replace( loc:find, loc:replace )** **! Replace dialog** **loc:position = oRTF_RTFTextBox.Replace()** **Template Prompts:** **Associated RTF control** Select the RTF control from the drop-down list. All controls on the Window are included in the list. This field in required. **Find string or variable** Specify the text to search for within the rich text field. A string or variable may be used. To use a variable, precede it with an exclamation point (!). **Replace string or variable** Specify the text to replace within the rich text field. A string or variable may be used. To use a variable, precede it with an exclamation point (!).