Maintained by Picture of Eoin CampbellEoin Campbell
Import entire Microsoft Word 2010 (.docx) files, including tables, embedded images and Microsoft Equation Editor equations, cleanly. Also imports LibreOffice and Google Docs files saved to .docx format.
2493 sites
1k downloads
100 fans
Current versions available: 2

This plugin allows users import the entire contents of a Word 2010 (or later) file as clean HTML, retaining formatting such as headings, lists, bold and italic. The heading styles in Word such as "Heading 1" are mapped to corresponding tags in HTML such as h3, h4 (the "Heading 1" style is mapped to h3, etc.). For best results, the imported Word files should be well-styled, i.e. use standard Word named styles (e.g. "Heading 1", "List Bullet") as much as possible.

It supports .docx files only, not the older .doc format. The following Word versions support this format: Word 2007, Word 2010 and Word 2013 (on Windows); Word 2011 and Word 2016 (on MacOS). Note that files in.docm format (i.e. including macros) are not supported.

LibreOffice 5.x can also save files in .docx format, and they will import too, but generally the quality is not as good as native Word files, even if the document uses styles well.

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 Atto editing toolbar should have a new Word icon added to the files group, similar to the screenshot below.

Atto toolbar files group with WordImport icon added

You can click on the link to open the file selection dialog, or alternatively, just drag a file over the text area and it will be imported and converted.

Sets

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

Screenshots

Screenshot #0

Contributors

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

Comments RSS

Show comments
  • Picture of Denis Glagolev
    Wed, Aug 22, 2018, 10:09 PM
    Hallo, Thank you for that plugin, but Im not sure it is working well - after pushing "upload file" I have an error reading file ".docx". I have tried several files (with tables, images, and text only) and different browsers (chrome, maxthon, opera), but error the same
  • Picture of Eoin Campbell
    Thu, Aug 23, 2018, 1:40 AM
    You need to make sure the file is saved in Word in .docx format.
  • Picture of Tamtomo Abdi Negoro
    Thu, Nov 1, 2018, 6:02 PM
    Killed the first letter of every paragraph... wonder why? I didn't have time to wonder for long, tight schedule so have to uninstall it.. chose converting to PDF and upload the docs as PDF instead sad
  • Picture of Sa Ku
    Tue, Nov 20, 2018, 5:42 PM
    I tried installing the plugins but the installation stuck post validation with error: "error/tool installaddon/installing non installable component". What should I do to fix this?
  • Picture of Eoin Campbell
    Wed, Nov 21, 2018, 1:26 AM
    Perhaps your server has a file permissions issue in the /lib/editor/atto/plugins/ folder which prevents it from installing the plugin. Try installing a different Atto plugin to see if this might be the issue.
  • Picture of Mario Zappavigna
    Thu, Jan 31, 2019, 5:01 PM
    HI there, I've accidentally removed the atto plugin editor, can I still install this plugin or I would have problem?
  • Picture of Eoin Campbell
    Fri, Feb 1, 2019, 5:31 AM
    I don't know, I imagine it won't install since it requires that Atto be installed.
  • Picture of Ruthie Tobbie
    Sat, Feb 23, 2019, 12:56 PM
    Hello, thank you for this wonderful plugin. I have a problem, every time I import, paragraph texts are RTL but the headings and images are normal (LTR). I am using Adaptable theme. I have never used the RTL plugin. I deleted the RTL plugin installed, and clear all cache to see if it will work but no avail.

    I have somehow been managing it by aligning the text to the left after importing, even though all punctuation marks are aligned to the left. I can’t continue any further because all texts with bullets are RLT and there’s no way to rearrange them.

    What should I do to fix this? I need help! It will take forever to type in lesson contents. How do I go about this please?
  • Picture of Eoin Campbell
    Sat, Feb 23, 2019, 5:02 PM
    The most likely reason is that the Word file has RTL set, I think. It’s definitely nothing to do with the theme, and not with other Atto plugins either. Have you tried importing a clean new Word file freshly created from a template?
  • Picture of Ruthie Tobbie
    Sun, Feb 24, 2019, 9:16 AM
    Thank you for the prompt response/Insight. After I saw you mentioned templates, it dawn on me that it could be because I exported the word file from iOS pages before uploading it. I freshly created a template from google docs, word and liber Office, surprisingly it came up normal and ok. It was so painful because I have spent years working on theses courses directly on pages, only to start uploading. I called Apple, but they couldn’t help. They insisted it’s from moodle. I tried to find a way around it: so I downloaded as word from pages, upload to google drive, redownload as word. With this method, All the text all came up in in Capital letters and no highlights and other style. So I decided to change the font on google docs before redownload it as word. These way, the paragraphs came up normal although without all styling, highlights etc. But the images came up. This is way better than the RTL which is unusable, nor the All caps, nor starting afresh all over on a Microsoft word. Even though I have to do lots of edits, it is still better. Please do let me know if you have another way I can go about this to make it faster(not having to go through the styling all over again). Thank you so much for this wonderful plugin.
  • Picture of Eoin Campbell
    Sun, Feb 24, 2019, 8:11 PM
    As I thought, the paragraph settings in the file converted from Pages has the text direction set to RTL. A workaround is as follows.
    1. Import into the Atto field
    2. Expand the Atto edit field toolbar and turn on the source HTML view, (the icon with ">").
    3. Copy all the text and paste to an external editor.
    4. Search for and delete the strings 'direction:rtl;' and ' dir="rtl"'. These strings are telling the browser to display as RTL.
    5. Copy and paste the text back into the Atto edit field, and then revert to the normal WYSIWYIG view.

    A larger issue is that the conversion process retains formatting but doesn't seem to use the native Word styles such as Headings, List Bullet, etc. The results will be relatively poor unless you reformat the Word document to use these styles. Another issue is that importing large Word files into a single Moodle Page resource is not the best way to present long narrative text. The Moodle Book resource is better for long documents, and you can use the Microsoft Word file Import/Export (Book) plugin (cf. https://moodle.org/plugins/booktool_wordimport) to import convert Word files and split them into sub-pages by heading.
  • Picture of Ruthie Tobbie
    Mon, Feb 25, 2019, 7:04 AM
    Thank you so so so much. Thanks for your help! After following the 5 steps you gave, it came up perfect for the pages. But as you’ve rightly stated that moodle book resource is better for long documents ( Thank you for pointing out this to me), I tried the 5 steps for the book import, it didn’t come out well. Just like you stated, the headings and list bullets didn’t show up. I tried a workaround of copying and pasting to a fresh word document, edit the headings to use word headings, and also the body to use word body. With only these, the book came out perfectly well, and the RTL was readjusted automatically. With these, I don’t need to delete the “RTL” strings.

    I can’t thank you enough for sparing your time to help me make this work. Thank you Again!
  • Picture of Visvanath Ratnaweera
    Sat, Apr 20, 2019, 8:02 PM
    Have you changed the plug-in name from wordimport to atto_wordimport? I get "Invalid get_string() identifier: 'modulename' or component 'mod_wordimport'. Perhaps you are missing $string['modulename'] = ''; in mod/wordimport/lang/en/wordimport.php?" when I try to install (on Moodle 3.5). The file is perhaps renamed atto_wordimport.php?
  • Picture of Eoin Campbell
    Tue, Apr 23, 2019, 4:48 PM
    The plugin name has never changed and the pluginname value is present (cf. https://github.com/ecampbell/moodle-atto_wordimport/blob/master/lang/en/atto_wordimport.php#L25), so I don't think that's the issue. I suggest you uninstall and try again. It certainly installs properly on my Moodle 3.5 sites
  • Picture of Visvanath Ratnaweera
    Sun, May 12, 2019, 11:18 PM
    Hi Eoln, here is the full error output. The software involved are LAMP Debian 9, PHP 7.0, XSL (libxslt 1.1.29) active, Moodle 3.5.5.
    Plugin mod_wordimport does not declare valid $plugin->component in its version.php.
    line 315 of /lib/classes/plugin_manager.php: call to debugging()
    line 335 of /lib/classes/plugin_manager.php: call to core_plugin_manager->load_present_plugins()
    line 217 of /lib/classes/plugininfo/base.php: call to core_plugin_manager->get_present_plugins()
    line 143 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base->load_disk_version()
    line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
    line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
    line 355 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
    line 1118 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins()
    line 1238 of /admin/renderer.php: call to core_plugin_manager->missing_dependencies()
    line 212 of /admin/renderer.php: call to core_admin_renderer->missing_dependencies()
    line 679 of /admin/index.php: call to core_admin_renderer->upgrade_plugin_check_page()
    Invalid get_string() identifier: 'modulename' or component 'mod_wordimport'. Perhaps you are missing $string['modulename'] = ''; in mod/wordimport/lang/en/wordimport.php?
    line 349 of /lib/classes/string_manager_standard.php: call to debugging()
    line 7162 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 64 of /lib/classes/plugininfo/mod.php: call to get_string()
    line 142 of /lib/classes/plugininfo/base.php: call to core\plugininfo\mod->init_display_name()
    line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
    line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
    line 355 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
    line 1118 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins()
    line 1238 of /admin/renderer.php: call to core_plugin_manager->missing_dependencies()
    line 212 of /admin/renderer.php: call to core_admin_renderer->missing_dependencies()
    line 679 of /admin/index.php: call to core_admin_renderer->upgrade_plugin_check_page()
    Skip to main content
1 2 3 4
Please login to post comments