Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
RichText.ReplaceText
Replaces text in current rich text document with new text.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| RichText | 4.4 | Yes | No | No | Yes, macOS only | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| SearchText | The text to search. Search is case insensitive. | "$FirstName" | |
| NewText | The new text to use as replacement. Can be empty. | "Christian" | |
| Multiple | Optional, Pass 1 to replace all occurrences. Default is 0 to replace the first one found. | 0 | Optional |
Result
Returns Count or error.
Description
Replaces text in current rich text document with new text.This can be used to load Word file (DOC, RTF, DOCX), replace place holders with values for client and save a personalized copy.
Version 6.0 and newer returns number of replaces. Older versions just returned OK on success.
Examples
Replace choclate with vanilla:
Set Variable [ $r ; Value: MBS( "RichText.ReadHTML"; "<html><body><p><b>Schokoladenplätzchen</b></p></body></html>" ) ]
Set Variable [ $r ; Value: MBS("RichText.ReplaceText"; "Schokoladen"; "Vanille") ]
Show Custom Dialog [ "HTML" ; MBS( "RichText.HTMLText" ) ]
See also
- RichText.HTMLText
- RichText.ReadHTML
- RichText.ReadText
- RichText.ReplaceTexts
- RichText.WriteContainer
- RichText.WriteFile
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 6.0pr8
- MBS FileMaker Plugin, version 5.3pr5
- MBS FileMaker Plugin, version 5.1pr7
- MBS Filemaker Plugin, version 4.4pr6
Created 16th October 2014, last changed 25th November 2017
RichText.Release - RichText.ReplaceTexts
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins