Platforms to show: All Mac Windows Linux Cross-Platform

WordFileMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Wordfile MBS XL Plugin 15.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Word file editing.
dim f as FolderItem = GetFolderItem("test.docx")
dim b as BinaryStream = BinaryStream.Open(f)
dim d as string = b.Read(b.Length)
dim w as WordFileMBS = WordFileMBS.OpenData(d)

if w.ReplaceTag("FirstName", "Peter") then
if w.ReplaceTag("LastName", "Miller") then

f = GetFolderItem("output.docx")
if w.WriteFile(f) then
MsgBox "OK"
end if
end if
end if
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.

Feedback, Comments & Corrections

  • 7 properties
  • 15 methods
  • 3 shared methods
    • shared method OpenData(Data as MemoryBlock) as WordFileMBS
    • shared method OpenData(Data as String) as WordFileMBS
    • shared method OpenXML(XML as String) as WordFileMBS

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

The items on this page are in the following plugins: MBS XL Plugin.

WMIObjectMBS   -   X509MBS

The biggest plugin in space...

MBS Xojo Plugins

Start Chat