WordFile.Texts
--------------

Extracts text of word file.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WordFile](component_WordFile.md) | [5.4](newinversion54.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "WordFile.Texts"; WordFile ) 

**MBS**( **"WordFile.Texts";** /\* Extracts text of word file. \*/  
**$WordFile**) /\* The reference number of the open word file. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WordFile | The reference number of the open word file. | $wordFile |

### Result

Returns text or error.

### Description

Extracts text of word file.  
Plugin inserts a few newline characters for detected line ends.  
  
May not give all text. If you miss something, please send us test files.  
### Examples

Extracts text:

 Set Field \[WordFiles::Texts ; MBS ("WordFile.Texts"; $WordFile )\]  
Open word file and extract text:

 Set Variable \[$w ; Value:MBS ( "[WordFile.OpenContainer](WordFileOpenContainer.md)"; Extract text from Word file::WordFile )\]  
If \[MBS ("iserror")\]  
 Show Custom Dialog \["Failed to read word file"; $w \]  
 Exit Script \[\]  
End If  
Set Field \[Extract text from Word file::Text ; MBS ( "WordFile.Texts"; $w )\]  
Set Variable \[$r ; Value:MBS ( "[WordFile.Release](WordFileRelease.md)"; $w )\]  
### See also

- [IsError](IsError.md)
- [RichText.Text](RichTextText.md)
- [WordFile.OpenContainer](WordFileOpenContainer.md)
- [WordFile.Parts](WordFileParts.md)
- [WordFile.Release](WordFileRelease.md)
- [WordFile.Tags](WordFileTags.md)

### Release notes

- **Version 16.2**
    - Improved [WordFile.Texts](https://www.mbsplugins.eu/WordFileTexts.shtml) function to add more line breaks.
- **Version 15.4**
    - Improved [WordFile.Texts](https://www.mbsplugins.eu/WordFileTexts.shtml) to skip a couple of node types.

### Example Databases

- [WordFile/WordFile](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WordFile/WordFile.shtml#7ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 16.2pr2](https://www.mbsplugins.de/archive/2026-04-13/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.4pr2](https://www.mbsplugins.de/archive/2025-08-12/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2021, Seite 20](https://filemaker-magazin.de/neuigkeit/4165-Appetithappen-FMM_202106)
- [Ausgabe 6/2016, Seite 38](https://filemaker-magazin.de/neuigkeit/3913-Appetithappen-FMM_201606)

This function checks for a license.

Created 5th November 2015 , last changed 19th January 2018

  
[WordFile.Tags](WordFileTags.md) - [WordFile.WriteContainer](WordFileWriteContainer.md)

[HTML Version](WordFileTexts.shtml)