Platforms to show: All Mac Windows Linux Cross-Platform
WordFileMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Wordfile | MBS Tools Plugin | 15.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This is a class for reading word files and replacing text to customize document files.
Works for xml and docx files. Does not support old doc file format.
Please report document files where plugin corrupted file or failed to replace text.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 7 properties
- property Caseless as Boolean
- property CloseMarker as String
- property OpenMarker as String
- property Text as String
- property XML as String
- property MediaFile(name as string) as String
- property XML(part as String) as String
- 18 methods
- method addMediaFile(name as string, content as string)
- method Append(other as WordFileMBS, AddPageBreak as boolean = false) as Boolean
- method AppendTableRow(tag as string) as Integer
- method Constructor Private
- method Contains(findText as string) as boolean
- method DuplicateTableRow(tag as string) as Integer
- method FieldNames as String()
- method GetFieldText(fieldName as string, byref text as String) as boolean
- method HasTag(tag as string) as boolean
- method MediaFiles as String()
- method Parts as String()
- method RemoveTableRow(tag as string) as Integer
- method ReplaceTag(tag as string, text as string = "", All as boolean = false) as boolean
- method SetFieldText(fieldName as string, text as String) as boolean
- method SetMarkers(openMarker as String, closeMarker as String) as boolean
- method Substitute(findText as string, replaceText as string = "", All as boolean = false) as boolean
- method Tags as String()
- method WriteFile(path as folderItem) as boolean
- 3 shared methods
This class has no sub classes.
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 24.3pr1
- MBS Xojo Plugins, version 24.2pr1
- News from the MBS Xojo Plugins Version 22.2
- MonkeyBread Software Releases the MBS Xojo Plugins in version 22.2
- MonkeyBread Software Releases the MBS Xojo Plugins in version 22.0
- News from the MBS Xojo Plugins Version 21.4
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.4
- MBS Xojo Plugins in version 19.2
- MBS Xojo / Real Studio plug-ins in version 16.3
- MBS Xojo / Real Studio plug-ins version 16.2
Xojo Developer Magazine
Videos
- Presentation from Munich conference about MBS Plugins.
- Presentation from London conference about MBS Plugins.
Release notes
- Version 24.3
- Fixed the ReplaceTag function in WordFileMBS, which broke in 14.2.
- Version 24.2
- Improved ReplaceTag and Substitute functions in WordFileMBS class to remove control characters from replacement text to avoid creating broken word files.
- Version 23.2
- Moved WordFileMBS class to Tools plugin.
- Version 22.5
- Fixed problem in ReplaceTag for WordFileMBS class with all = true, where it returned error, but replaced tags.
- Version 22.2
- Added Tags function to WordFileMBS class.
- Version 22.0
- Added support for tab character in text replacements with WordFileMBS class.
- Version 21.5
- Fixed an edge case for Substitute in WordFileMBS class not working correctly for text near the end of the document.
- Version 21.4
- Added Contains and Substitute methods to WordFileMBS class.
- Fixed a case where removing a table row with WordFileMBS class would not be saved.
- Version 21.0
- Fixed a memory leak in WordFileMBS class.
The items on this page are in the following plugins: MBS Tools Plugin.