How to prepare a Word file for import into a Book

From MoodleDocs

This document describes how to edit a Word file so that it imports well into a Moodle Book resource using the Microsoft Word File Import/Export (Book) plugin. It also covers some aspects of converting Word documents into Glossaries and Lessons, and quiz questions in Word documents into a course Question bank (using the Microsoft Word File Import/Export (Question Format) plugin). To re-format existing long documents for importing into Moodle Books, especially documents derived from PDF files, the most efficient approach is to make multiple passes through the document, focusing on a single aspect at a time: start with headings, then do lists, then paragraphs, followed by figures, then tables, any equations, etc. If you are starting to write a new Word document, just do it right from the beginning and use the built-in heading styles.

Word interface configuration

  1. In Word, ensure the MoodleBook ribbon menu is available. The moodleBookStartup.dotm Word template which contains this menu must be installed in your Word Startup folder (c:\users\''{yourname}''\Appdata\Roaming\Local\Microsoft\Word\Startup).
  2. Go into Draft view by choosing View > Draft (Views section of ribbon).
  3. Turn on the display of the Style area pane by using the command MoodleBook > Toggle Views (Utilities section) > Show/Hide Style Area.
  4. Turn on the Navigation pane using command View > Navigation pane (View section).
  5. Turn on the Styles list by pressing <Ctrl>+<Alt>+<Shift>+S, or turning on Styles list display (see Figure 2).

After this setup, the Word interface should look like the screenshot below, showing the Navigation pane on the left, then the Styles list, then the Style area pane in the middle, and the document text on the right.

Screenshot of Word editing interface with Navigation pane and Style area pane enabled
Figure 1: Word editing interface optimised for style-based formatting

How to turn on style display

Word Styles panel in Home Ribbon
Figure 2: Home ribbon Styles section

Headings

The most important aspect of formatting a Word document is to get the headings right. You must use the predefined Word heading styles “Heading 1”, “Heading 2”, etc. The Navigation pane displays these headings so that you can quickly and easily navigate around the document by clicking on a heading there. In addition, headings allow Word to generate a Table of Contents automatically, and to save a document as a PDF file that retains the headings as bookmarks, supporting quick, easy and accessible navigation of the PDF document as well.

Finally, the headings are necessary to allow the Word import facility in the Moodle Book resource to split a long Word document into smaller sections, so that a Word document is decomposed into multiple web pages rather than presented as a single very long page. Moodle can split a document using just the “Heading 1” style (into Book chapters), or also using the “Heading 2” style (using the Book Subchapter feature).

Check the Navigation pane

The Navigation pane shows headings that are formatted using the heading styles. Unfortunately, it also shows headings that are not formatted using these styles, so you must check them closely.

  • If headings are numbered, check that all the numbers are present in the Navigation pane. Missing numbers indicate a heading that is not formatted properly. Find it and set the style appropriately.
  • If there are blank items in the Navigation pane, this indicates a heading style is used, but with no content (usually done to insert vertical space). Delete the corresponding paragraph, or else change the style to “Body Text” instead.

Check the Style area pane

Scroll down the document and compare the actual text formatting with the named style in the Style area pane.

  • Sometimes a custom style like “Chapter Title” is used instead of the pre-defined style “Heading 1”. Apply the appropriate predefined heading style instead.
  • Sometimes text is formatted to look like a heading, but it uses the “Normal” or other standard paragraph style. Apply the appropriate predefined heading style instead.
  • Sometimes a heading appears inside a table cell, perhaps to apply a particular presentation. This prevents the style name from being displayed in the style area pane. Place the cursor inside the text of the heading and the style should be highlighted in the Styles list. If possible, remove the table so that the heading name appears in the Style area pane.

Convert numbers in auto-numbered headings

Many documents use auto-numbered headings. The numbers are lost on import to Moodle. To keep the numbers, either explicitly enter them for each heading (tedious), or run a VBA macro to convert the auto-numbering to fixed text. See VBA Macro 2 on “2 Ways to Convert Automatic Numbering to Normal Texts in Your Word Document”.

Check the heading structure on import

After setting the heading styles, import the Word file into a Moodle Book, splitting the file into both Chapters and Subchapters. This checks the headings and is a simple sanity check that the document structure is correct. Two issues may appear in the headings.

  • The heading text in the Book Table of Contents is blank: this is probably because the heading style is superfluous and should be deleted from the Word document.
  • The heading text is “index.htm”: this is probably because the heading contains text that is not formatted according to the default heading style definition. It may also happen if there is sub- or super-script text in the heading. To fix it, select all the heading text in the Word file and press <Ctrl>+<Space> to remove all character-level formatting.

Start a section on a new page

To force a new page to be created before a heading (particularly “Heading 1”), don't insert a hard page break. Instead, change the heading properties to force a new page. Note that this has no effect when imported into Moodle.

  • If you always want a top-level section to start on a new page, adjust the “Heading 1” style by right-clicking its name in the Styles list and choosing “Modify”. This then applies to all “Heading 1” styles.
  • If you just want to do it on an ad-hoc basis, place the cursor within the heading, and use the Home ribbon Paragraph section Paragraph Settings expander to change the properties for that heading only.
  • In both cases, go to the Line and Page Breaks tab in the Paragraph dialog box, check the “Page break before” checkbox, and click the “OK” button.
Word Paragraph Dialog box, Lines and page breaks tab
Figure 3: Force a page break before a paragraph style

Paragraphs

The following are some general suggestions on formatting paragraphs.

  • Use the “Body Text” style for paragraphs, not the “Normal” style.
  • If you want the first line in the first paragraph after a heading not to be indented, use the “Body Text First” style. You can set heading styles so that the following paragraph is automatically set to “Body Text First”, and set the “Body Text First” style so that the following paragraph is set to “Body Text”.
  • Delete empty paragraphs, do not use empty paragraphs to create vertical space in your document.

Formatting documents extracted from PDF files

If a document is copied and pasted from a PDF file into Word, the normal paragraph endings are all lost, which is a nuisance. To fix this efficiently, select the paragraphs of text that you want to convert back into a single paragraph, and press <Ctrl>+<Shift>+A. This runs a macro that replaces paragraph endings in the selected text with spaces. You must have the moodleBookStartup.dotm template installed. If you don't, you can instead use the Find and replace dialog to achieve the same result: select the text, press <Ctrl>+H to open the dialog, set the “Find what” field to ^p and the “Replace with” field to a single space, and click the “Replace all” button. Then close the dialog, select the next set of paragraphs, and press <Ctrl>+Y to repeat the same replace operation.

Lists

Lists must use the pre-defined “List Bullet” and “List Number” styles, or else they will be converted into normal paragraphs when imported into Moodle. The lists could look fine in Word, but they will be lost on import.

Traverse the document looking for lists that use the “Normal” style. Select all the items in the list and press <Ctrl>+<Shift>+L to apply the “List Bullet” style. <Ctrl>+8 also works. Use <Ctrl>+9 to apply the “List Number” style.

Nested lists

The Moodle Book Word import facility does not support nested lists. There are a couple of workarounds. One is to use a lower-level heading style for the top-level list item, and the standard list style for the nested list. Another is to rewrite the text slightly to avoid nested lists.

If neither works, you can use a single paragraph with forced newlines (use <Shift>+<Return> to force a new line without ending the paragraph) to achieve the visual effect you want.

  • Bullet list item
    * Sublist item 1 * Sublist item 2

Figures

Figures must be embedded into the Word file as web-compatible images, i.e. using GIF, JPG or PNG format. You must add any annotations directly into the image, not in the Word file. You should also set the size of the image, don't change it in the Word file.

Microsoft Draw objects are not supported. To check if an image uses the Draw object, right-click on it, and if “Grouping” appears in the menu, it is a Draw object and must be replaced with an embedded image instead. If you want to keep using Draw as the image editing tool, move the image to a separate Word file and edit it there. If you have a lot of such images, you can keep them all in the same file to simplify ongoing maintenance. You can edit all your images here, then screen-shoot them whenever they change, and paste the final image into your master Word document.

Do not anchor images to text. Embed them into their own paragraph instead. If an anchor symbol appears when you click on an image (see Figure 3), then screen-shoot the image, insert the new image, and delete the original.

The Word anchor icon may appear when an image is selected
Figure 4: Check an image to see if it is anchored

Screen-shooting software

The free Greenshot screenshooting application (getgreenshot.org) is excellent and very efficient for taking screenshots of images and embedding them into a Word file.

Tables

The Moodle Book Word import facility supports table features such as merged row and column cells, left and right justification of cells, etc. If a table has heading rows, mark these using the table Layout > Repeat Header Rows (Data section) command. This ribbon only appears (on the right) when the cursor is inside a table. The “Repeat Header Rows” flag is enabled only when the cursor is in the first row of cells, or when the first one or more rows are selected.

Word Table Layout ribbon
Figure 5: "Repeat Header Rows" flag for tables

To mark row headings, apply the “Table Row Head” style to the first cell in a row. Use these styles to maximise the accessibility of the table when converted into a Moodle Book page.

Equations

The Moodle Book Word file import facility supports converting equations that use the modern Microsoft Office Math Equation Editor, but not the older Microsoft Equation 3.0 format. Convert such equations to the new format by right-clicking on the equation, and then selecting Microsoft Equation 3.0 Object > Convert to Office Math.

Context-sensitive menu when right-clicking on a Microsoft Equation 3.0 equation object
Figure 6: convert Microsoft Equation 3.0 equation to Office Math

Equations are converted into MathML format as part of the import process, not to images. These equations are then displayed in Moodle using the MathJax plugin, and so are fully accessible.

Footnotes and endnotes

The Moodle Book Word import facility doesn't currently support importing footnotes or endnotes in Word – the footnote text is simply omitted. As a workaround, put the footnote text into parentheses within the paragraph itself. If the footnote has multiple paragraphs, insert it as a note at the end of the section.

Alternatively, just leave the text as is, and it will remain in the Word file and any generated PDF document, but be omitted from the web content.

Spelling and grammar

Set the correct spelling language for your document. Select all the text in the Word file., then use the command Review > Language (Language section) > Set proofing language, and select your preferred language. Make sure the “Do not check spelling or grammar” checkbox is not checked. After selecting the language from the list, click the “Set As Default” button to set this as the default for all your documents (see screenshot below). Finally, click the “OK” button to set the spelling language for this document.

Word set language dialog box
Figure 7: Set the default language for spelling and grammar

After setting the default language, traverse the document looking for spelling errors (underlined in red) and fix them. Do this

  • If the word is misspelled, Word will often suggest a correction. You can either accept this or enter your own correction within the dialog box.
  • If the word is spelled correctly, right-click the mouse over it and choose “Add to dictionary”.
  • If the word is a proper name, you probably shouldn't add it to the dictionary, so you may choose to ignore this occurrence, or throughout the document.

If you can't find any misspelled words, type in a nonsense word to check that highlighting of misspellings is turned on.

There are many spelling options in tile File > Options command Proofing tab that you can adjust to suit your needs.

Language support

  • Right-to-left languages such as Arabic and Thai are supported.
  • Japanese Ruby annotations are supported, but can be problematic as there may be font difficulties.