MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

WordFileMBS class

class, Wordfile, MBS XL Plugin (WordFile), class WordFileMBS,
Plugin version: 15.4, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

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.

This class has no sub classes.

Some examples which use this class:

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

WMIObjectMBS   -   X509MBS

MBS FileMaker tutorial videos