Skip to content

Bug: DOCX exports are non-editable in Word for iPad #94

Description

@codemaestro

Bug: DOCX exports are non-editable in Microsoft Word for iPad due to missing settings.xml

Summary

DOCX files generated by Obsidian Document Exporter open successfully in Microsoft Word for iPad but cannot be edited.

The document renders correctly, but Word disables its editing controls.

I isolated the problem to the absence of word/settings.xml and its required OOXML relationship/content-type registration.

Adding only these elements to an otherwise unchanged Document Exporter DOCX makes the document editable in Word for iPad.

Environment

  • Obsidian with Document Exporter plugin
  • Export format: Microsoft Word (.docx)
  • Microsoft Word for iPad
  • Active Microsoft 365 subscription

Symptoms

A DOCX exported by Document Exporter:

  • opens and renders normally in Word for iPad
  • displays text, formatting, and embedded images correctly
  • shows no corruption or protection warning
  • has its editing controls disabled
  • cannot be edited

Documents created directly in Word on the same iPad are editable normally.

The behaviour is the same whether the exported DOCX is opened from iCloud Files or uploaded to OneDrive and opened directly from within Word.

Cause isolated by A/B test

I tested the original non-editable Document Exporter DOCX without changing its document content, styles, formatting, or embedded image.

Test A — original export

The Document Exporter package did not contain:

word/settings.xml

There was consequently no settings relationship in:

word/_rels/document.xml.rels

and no settings registration in:

[Content_Types].xml

Result in Word for iPad:

Document renders but is not editable.

Test B — settings added

I modified the same DOCX by adding only:

  1. word/settings.xml
  2. the settings relationship in word/_rels/document.xml.rels
  3. the settings content-type registration in [Content_Types].xml

No document content or formatting was changed.

Result in Word for iPad:

The document became editable.

Required relationship

word/_rels/document.xml.rels needs a relationship to the settings part, for example:

<Relationship
    Id="rIdSettings"
    Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"
    Target="settings.xml"/>

The actual relationship ID can of course be assigned as appropriate by the exporter.

Required content type

[Content_Types].xml needs to register the settings part:

<Override
    PartName="/word/settings.xml"
    ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>

settings.xml

The test file used a valid Word settings part containing the standard Word compatibility setting, including:

<w:compat>
    <w:compatSetting
        w:name="compatibilityMode"
        w:uri="http://schemas.microsoft.com/office/word"
        w:val="15"/>
</w:compat>

Expected behaviour

DOCX files exported by Document Exporter should open as editable documents in Microsoft Word for iPad.

Actual behaviour

Without word/settings.xml and its associated relationship/content-type registration, Word for iPad opens the exported document in a non-editable state.

Adding those components makes the same document editable.

Suggested fix

When generating DOCX files:

  1. Generate a valid word/settings.xml.
  2. Add the settings relationship to word/_rels/document.xml.rels.
  3. Register /word/settings.xml in [Content_Types].xml.

This was sufficient in my controlled test to change the same Document Exporter DOCX from non-editable to editable in Microsoft Word for iPad.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions