Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Replaces some text in the document with new text.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WordFile | 11.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
WordFile | The reference number of the open word file. | $wordFile | |
FindText | The text to look for. | "$City" | |
Text | The new text. | "New York" | Optional |
All | Pass 1 to replace all occurrences with same text. | 1 | Optional |
Returns OK or error.
Substitute a text in word file:
# load it
Set Variable [ $Wordfile ; Value: MBS( "WordFile.OpenContainer"; myTable::InputWordFile ) ]
# replace something
Set Variable [ $r ; Value: MBS( "WordFile.Substitute"; $Wordfile; $SearchWord; $ReplaceWord ]
# write it
Set Field [ myTable::OutputWordFile ; Value: MBS( "WordFile.WriteContainer"; $Wordfile; "Test.docx" ) ]
# release memory
Set Variable [ $r ; Value: MBS("WordFile.Release"; $Wordfile) ]
This function checks for a license.
Created 8th August 2021, last changed 8th September 2021