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: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

WordFile.Substitute

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
MBS( "WordFile.Substitute"; WordFile; FindText { ; Text; All } )   More

Parameters

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

Result

Returns OK or error.

Description

Replaces some text in the document with new text.
Like WordFile.ReplaceTag function, but without markers around the tag.

Handles multi line text better for normal paragraphs. It creates for you new paragraphs for each line in the new text.

If you change font or style of the text within the find text, it will not be recognized. So please keep all text within the same font style.

See also

Release notes

Blog Entries

Created 8th August 2021, last changed 8th August 2021


WordFile.SetXML - WordFile.Texts

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins

Start Chat