PHP Library for simply extracting text from Word documents. No formatting provided.
First you need to have composer installed.
foo@bar:~$ composer require kmak/phpword2text
Then in your code you can do the following:
<?php
require __DIR__ . '/vendor/autoload.php';
$phpword = new PHPWord2Text();
$txt = $phpword->extractText('somefile.docx');
echo $txt;