Microsoft Word File Import/Export (Book)

Book tools ::: booktool_wordimport
Maintained by Eoin Campbell
Import the contents of a Microsoft Word file into a book, splitting it into chapters and (optionally) subchapters, based on the heading styles. The file can be saved from Microsoft Word, Google Docs or LibreOffice, as long as it has a '.docx' suffix. Also supports exporting books to Word format, for round-trip editing.
Latest release:
4462 sites
102 fans
Current versions available: 3

This plugin supports importing a Microsoft Word docx-formatted file as chapters to a book. The file is split into chapters and subchapters based on the built-in heading styles "Heading 1" and "Heading 2" in Word. Embedded images are also imported if they are in web-compatible format (GIF, PNG, JPEG).

It imports .docx files only, not the older .doc format.  Note that files in.docm format (i.e. including macros) are not supported.

Both GoogleDocs and LibreOffice 5.x can also save files in .docx format, and they will import too, but generally the quality is not as good as those files saved from the native Word editor, even if the document uses the same built-in "Heading 1" and "Heading 2" styles well. Your mileage may vary.

Note also that the PHP XSL extension must be enabled on your webserver, and the plugin requires Moodle 2.7 or higher.

After installation, the Book administration menu should have a new item added, similar to the screenshot below. You must create a new book, or turn on editing in an existing book, to see this menu.

Book administration menu

The plugin can also be used to export books, or chapters from books, back into Word .doc format. In general heading elements in HTML are converted back into corresponding heading styles in Word, and so on with other styles. The exported file must be opened first using Microsoft Word. You can then save it to .docx format and edit it in LibreOffice or GoogleDocs. If the exported file contains images, then you must use Word 2019 or higher, or Word 365 (web version) , in order for images to be opened correctly.


This plugin is part of set Microsoft Word file import/export.


Screenshot #0


Eoin Campbell (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Wed, Jul 11, 2018, 2:13 PM
    Hi Eoin,

    I've been trying to get the Image Converter to work on Windows 7 with Office 2016. When I run the Image converter, it appears to run for about 30-60s and ends with a notification that it's been disabled to avoid issues with Windows Defender. Windows Defender is disabled, but we are using Microsoft Security Essentials, which I did have an exception in to allow the file.

    Would you have any suggestions?

  • Thu, Jul 12, 2018, 5:12 AM
    The default publicly available Word template on has this function disabled, because various virus checkers believe it contains malicious code. If you register on the site and create your own account, you can download an older version that still contains this function, in the WordTable Question conversion course at Unfortunately the digital signature on both these template files has just expired, and it will take me a few weeks to get a new signature, so I think you will have to allow untrusted VBA macros to run to get it to work for the moment.
  • Mon, Feb 4, 2019, 8:31 PM
    Hi everyone. Thank you all for the information.
  • Tue, May 14, 2019, 4:49 PM
    Is there any easy/quick solution for editing bullets and numbers to ++L and ++S, as it is taking long time for 50+ pages word files.
  • Tue, May 14, 2019, 5:43 PM
    I recommend using the moodleBook.dotm Word template I created that has a set of keyboard macros defined to speed up editing (cf. You need to install it in your Word Startup folder.
  • Tue, May 14, 2019, 10:06 PM
    See also regarding Word templates and keyboard shortcuts
  • Thu, Feb 13, 2020, 11:35 PM
    Hi Eoin I tried to create an account on so I can get hold of the template that also converts images into word format (as per your reply to Tamar 07/02/18, but am not receiving the confirmation email to activate my account. Is there any way to get hold of the template?
  • Wed, Apr 7, 2021, 3:11 AM
    Hello Eloin!

    I can't install the Microsoft Word file Import / Export (Book) update, I use Moodle 3.10. Currently the version that is installed on my Moodle is version 1.4.2 (Build: 2021040500) and it says that version 1.4.3 (Build: 2021040501) is available, but I can't install it.

    Thanks for any answer!
  • Wed, Apr 7, 2021, 4:32 AM
    I have the same problem, but I don't know why this is happening. I suggest you uninstall version 1.4.2 and then try installing 1.4.3 instead. If that doesn't work, revert back to version 1.4.1 if you can. I'll try and figure out what is going on.
  • Wed, Apr 7, 2021, 6:33 AM
    I have released a new version, 1.4.4, which fixes this problem, which only affects Moodle 3.10.
  • Mon, Apr 19, 2021, 7:15 PM
    Hi Eoin!
    I tested the new 1.4.6 version, but the export still a .doc file (not docx) without pictures.
    Do I have to change something to get an export file with pictures?
  • Mon, Apr 19, 2021, 8:15 PM
    Hi Csaba,
    On version 1.4.6, you must open exported Word files using Word 2020 on your PC, or else using the Word 365 web app. You will then see the pictures, and can save the file to .docx format. Previous versions of the plugin require you to install a custom Word template containing a VBA macro in order to post-process exported files so that you can see the images. The new mechanism in 1.4 is simpler and safer.
  • Tue, Apr 20, 2021, 7:58 PM
    Thanks, it works now smile
  • Thu, Apr 29, 2021, 2:03 AM
    Deu um erro na instalação. Versão 3.10.. (Faltando Disponível Informações do Plugin - booktool_wordimport (2020070601)
    E fica pedindo para atualizar a base de dados... travou nessa tela e não sai.
  • Thu, Apr 29, 2021, 8:12 PM
    I can't reproduce your error, but I suggest you try and install the latest version 1.4.6 (Build: 2021041100)
1 2 3 4
Please login to post comments