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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Writes current rich text to a container.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
RichText | 4.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Format | The file format to use. Can be DOC, DOCX or RTF. | "DOC" | |
FileName | The file name to use for the container. | "test.doc" | Optional |
Returns OK or error.
Read a file, apply replaces and save it:
# load from container
Set Variable [$r; Value:MBS("RichText.ReadContainer"; Replace Text in Word File::InputContainer)]
If [MBS("IsError")]
Show Custom Dialog ["Error"; "Failed to read file."]
Exit Script []
End If
# now loop through records to do replaces
Go to Record/Request/Page [First]
Loop
Set Variable [$r; Value:MBS("RichText.ReplaceText"; Replace Text in Word File::Old Text; Replace Text in Word File::New Text)]
Go to Record/Request/Page [Next; Exit after last]
End Loop
# write file
Set Field [Replace Text in Word File::OutputContainer; MBS("RichText.WriteContainer"; Replace Text in Word File::format)]
# cleanup
Set Variable [$r; Value:MBS("RichText.Release")]
This function checks for a license.
Created 16th October 2014, last changed 14th August 2017