Skip to main content
Skip table of contents

How to use Import from Word

How to import a word document into Lawmaker

Step 1: Prepare your Word document for import

  1. Ensure the document you want to import is saved as a Word document with a *.docx extension to its filename (seeImporting NI Bills from Word | How-to-convert-a-document-into-a-Word-document )

  2. If the document contains inserted text to other document types, add quoted structure codes (see Importing NI Bills from Word | How-to-code-your-inserted-text )

  3. Check for any common pitfalls and fix/remove as required (seeHow to use Import from Word | Common-pitfalls )

  4. Check for any known limitations and fix/modify as required (see Overview of Import from Word | Known-limitations )

  5. Save and close your document before selecting it for import

Step 2: Open Lawmaker and import the document

  1. In Lawmaker, navigate to the project you want to upload the document into

  2. On the Project tab, select Document Actions > Upload from Word

  3. In the dialog box, select or specify the folder you want to upload the document into, along with a unique version description and browse to the Word document you want to upload

  4. Click Upload and wait for Lawmaker to upload your document

Step 3: Check your document for import issues

  1. Open the document in the Editor

  2. Check the structure view to see how many sections and schedules were imported and compare to the word document to prepare yourself on how successful the import was

  3. Use the Document Check right-hand panel to spot and fix any known import issues (see How to use Import from Word | How-to-check-and-fix-import-issues )

  4. Generate a PDF and check for any style and formatting issues that might point to an incorrectly converted provision. Selecting line numbering sometimes highlights where an import issue might have crept in as sometimes these can break line numbering.

Step 4: Correct the Lawmaker document, or fix the Word document

  1. Depending on how many issues there are and the ramifications of these issues, it might be simplest to fix or modify the Word version and attempting to re-import the document.

  2. If the fixes aren’t too difficult, you might prefer to fix any import issues directly in the Lawmaker document.


How to convert a document into a Word document before you import it

Documents using open source office software (e.g. Legislative Work Bench) will often be saved as open document text (*.odt) format. To convert them into Word documents with the *docx filename extension, you need to open the document in Word and use Save As to save the document as a ‘Word document (*.docx)’ (using the drop-down menu after the filename).


How to code your inserted text (quoted structures)

Inserted text which inserts new provisions into enacted legislation appears within an element called a quoted structure in Lawmaker. Within each quoted structure element, Lawmaker stores the document that the inserted provisions are amending as metadata. By default, all inserted text in a document is assumed to be amending the enacted version of the document you are editing i.e. if you are drafting an NI Bill, then the document type for the quoted structure will automatically be stored as an Act of the Northern Ireland Assembly.

To override this default, you need to specify a quoted structure code, wrapped in curly braces {} and inserted directly before the start quote of the amending text in your Word document.

There are 2 parts to this code:

  • Document type code, and

  • Provision context code

In most cases you will probably only need to provide the document type code; however in some scenarios explained below, you may also need to help Lawmaker understand what provisions to insert where there could potentially be a few options.

Document type codes

The following table details the codes used for each document type in Lawmaker:

Document being amended

Document code

Northern Ireland Order in Council

nisi

Northern Ireland Statutory Rule

nisr

Scottish Statutory Instrument

ssi

UK Statutory Instrument

uksi

UK Public General Act

ukpga

Act of the Scottish Parliament

asp

Act of the Northern Ireland Assembly

nia

As of v19, if the document is inserting sections into a ukpga or asp, these will look like NI Sections with the section num appearing under the heading as opposed to appearing on the same line as the heading as is the practice for UK & Scotland.

Example document coding

Example when inserted text is to a different document type—

image-20250318-114506.png

Example where the start quote is inline before the inserted provisions—

image-20250325-145236.png

Due to the default document type assigned rule, you do not need to specify if you are amending an enacted version of the document you are drafting i.e. you do not need to specify {nia} if you are drafting an NI Bill.

Provision context codes

Lawmaker has to make certain assumptions when it’s not possible to determine the context of a quoted structure by looking at the content alone. For example—

  • If the inserted text starts with a provision that looks like a subsection and there are no other provisions within the inserted text that can be used to determine the context of the text, Lawmaker will assume it is a subsection whereas it could have been a schedule sub-paragraph.

  • If the inserted text starts with a paragraph and there is no other provision in the inserted text to determine the context, Lawmaker will assume it is a paragraph from inside a section or subsection. In most cases, this is probably correct: however it could be a paragraph in a schedule-derived provision.

  • If the inserted text contains a section-like provision and you have only provided a document code e.g. {nisi} or {nisr} then Lawmaker will assume the section-like elements is an article. This would work for Orders in Council (nisi) but might not be correct for statutory rules which may be regulations or rules.

Therefore, you will need to provide a provision context code within the quoted structure code to help Lawmaker transform the inserted text into the correct provisions.

Provision context codes

The following table details the codes used for each document type in Lawmaker:

Provision context

Provision context code

If the provisions are amending a schedule

-sch

Statutory Rule - rules

-rules

Statutory Rule - regulations

-regs

Statutory Rule - order

-order

Example provision context coding

Example of using a schedule provision context code, with a document code as well:

image-20250327-161555.png

Example of using a provision context code for secondary legislation:

image-20250327-161524.png

As part of the import process, Lawmaker will parse these quoted structure codes and if recognised, the resulting quoted structure will be updated accordingly. Lawmaker will strip out the text of these quoted structure codes from your document so that it does not appear in the imported content. If Lawmaker doesn’t recognise the code, a document check warning will appear, letting you know to check the document type and or provisions within the quoted structure and correct if necessary.

  • You do not need to provide a provision context code after nisi as Lawmaker assumes all section-like provisions will be articles. If you did provide the provision context code, this wouldn’t cause an issue either.

  • You will need to provide document code even if the inserted text is inserting provisions into a schedule in an Act of the Northern Ireland Assembly i.e. {nia-sch}

  • The parsing logic is case and format insensitive so if the auto-formatting converts your quoted structure code into bold, or italics or all caps, the parsing logic will still understand it.

How to check and fix import issues

Once you have successfully imported your document from Word, you should open the document in the Editor and check that everything is as it should be.

Firstly, check the Document Check right-hand panel for any obvious issues that Lawmaker encountered. The following table lists out the known import issues that Lawmaker has flagged for your attention.

Document check warning

Explanation

How to fix the issue

image-20250327-162441.png

Lawmaker was unable to identify what type of provision this content was intended to be so has inserted it as another sentence within the provision before it.

Decide what the provision should have been and use the insert menu to insert the correct provision

Steps to insert the correct provision
  1. Decide what the provisions should have been

  2. Highlight and cut the text inside this temporary text element

  3. Delete the empty text element (selecting it using the breadcrumb) using the backspace or delete key on your keyboard or right click > Delete Element

  4. With your cursor in the provision before, click Enter to view the insert menu

  5. Select the correct provision and paste the content into the newly inserted provision using Ctrl+V

If the provision should be treated as another paragraph of the provision before it, you can remove the document check warning.

Steps to remove the doc check warning
  1. Place your cursor in the additional paragraph

  2. View the Attribute right-hand panel

  3. Click on the class attribute and click on the delete icon.

This will remove the class attribute on the additional paragraph and thereby remove the document check warning

Use the quick fix links in the document check card to:

  • Remove flag from text once you’ve corrected the issue (or if there was nothing to fix) and this will get rid of the document check warning; or

  • Delete unrecognised text which will remove the whole provision from the document.

image-20250317-104357.png

Sometimes word documents contain malformed references where the reference is pointing to a provision that no longer exists. As Word doesn’t store references as text, the imported content of a malformed reference would be empty. Lawmaker will insert an empty ref element into the content at this location so that you can spot the omitted target provision and manually correct the content as required.

Correct the cross reference

Steps
  1. Place your cursor inside the empty ref element in the Editor view

  2. Select <ref> from the breadcrumb

    1. Delete the empty element (using backspace or delete key on your keyboard or right click > Delete Element)

  3. Correct the text e.g. by creating a new cross reference to the correct provision (see Quoted structures )

image-20250327-163058.png

If you provided a quoted structure code that didn’t match any of Lawmaker’s approved codes, a document check warning will appear.

Check what the quoted structure should have been.

How to update the quoted structures
  1. If the provisions inside the quoted structure were paragraph level or below (i.e. paragraph (a)) and the quoted structure should have been treated as a schedule: update the ukl:context in the Attribute r-hand panel to say “schedule

  2. If the provisions inside the quoted structure were paragraph level or below (i.e. paragraph (a)) and the document being amended wasn’t an Act of the Northern Ireland Assembly, change the ukl:docName from ‘nia’ to the correct docName code listed How to use Import from Word | Document-type-codes

  3. If the provisions inside the quoted structure were higher level than paragraphs and the amendments were being made to a schedule, you will need to change the ukl:context attribute as described in point 1 above, but also insert the correct elements and copy across the content e.g. subsections would be need to be inserted as schedule sub-paragraphs.

  4. If the provisions inside the quoted structure were higher levels than paragraphs and the document type being amended wasn’t an Act of the Northern Ireland Assembly then you need to update the ukl:docName attribute (as described in point 2 above) but also insert the correct provision type (e.g. articles instead of sections) and copy the content from the incorrect provisions.

Alternatively, correct the quoted structure code in your word document and reimport it again.

Use the quick fix link in the document check card to remove flag from the quoted structure once you’ve fixed the issue or determined there was nothing to fix. This will remove the document check warning.

image-20250401-191721.png

Northern Ireland Orders in Council (nisi) and Statutory Rules (nisr) do not have a cross heading element in their document model. Lawmaker handles them by inserting them as sections (which aren’t the same thing as sections in bills). Sections in nisi and nisr are centre-aligned, italicised grouping levels that look similar to cross headings. The section element typically consist of a number and a heading. In order to resemble a cross heading, Lawmaker omits the number and the document check warning is advising you that the number is missing. This is ok and can be ignored if this was your intention (i.e. to make it look like a cross heading)

N/A - assuming you wanted the heading to look like a cross heading in a bill, you can safely ignore this warning.

The other likely issues could be—

Common pitfalls

The following scenarios were detected during testing of this new feature and can cause issues or unintended outcomes when a document is imported. To ensure your document doesn’t succumb to these pitfalls, run cursory checks before importing your document to guarantee the greatest chances of success:

  1. Uneven number of quote marks: in the test documents we saw some definitions being inserted into enacted legislation with only one set of double quotes at the start. There should be 2 sets of double quotes at the start of a definition which is the starting element within inserted text. One is used to indicate that it is being inserted into enacted legislation and the other is used to indicate the first bit of text is a defined term in the definition. but they were missing the start quote for the inserted text. They had the start quote When inserting definitions as inserted text, you will need 2 sets of start quotes: one is used to identify that it is inserted text and one is used to identify that it is a definition.

  2. Uneven quote marks: if you have an accidental quote mark appear, this can cause issues with the logic to identify the start and end of quoted structures. Make sure you have an even number of quote marks around definitions and inserted text and structures.

  3. Missing em-dash or full-stop in numbers: the logic behind the import operation relies heavily on the correct format for numbers and headings in order to work out what the appropriate provision should be. If your import resulted in strangely structured provisions, check the formatting in the Word document around the location where the error creeps in.

  4. Quoted text included in the indented quoted structure: if you are inserting some text into enacted legislation before inserting new provisions, the text should appear in the opening provision before the inserted new provisions. In a few documents, the inserted text was contained in the indented paragraph containing the inserted provisions which is not recognised by Lawmaker e.g.

    image-20250327-163825.png

    which should have been written as—

image-20250327-163905.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.