Inline Content Controls cannot be manipulated with Word Online

Inline Content Controls cannot be manipulated with Word Online
 Apr 21 2021
0 Comments 
New

ASK: Word on all platforms should be able to manipulate both block and inline Content Controls equally

When a document contains Inline Content Controls, Word Online throws an error when we iterate over the context.document.contentControls collection and try to modify the content controls.

Expected Behavior

Word on all platforms should be able to manipulate both block and inline Content Controls equally.

Current Behavior

Whenever we try to update a property or content of an inline Content Control, an exception is thrown:

{
    "code": "NotAllowed",
    "message": "The action isn’t supported in Word Online. Check the OfficeExtension.Error.debugInfo for more information.",
    "errorLocation": "ContentControl.title",
    "statement": "v.title=...;",
    "surroundingStatements": [
        "var v=context.root._getObjectByReferenceId(\"{105c628f-6a88-4c23-a893-a8b84065fc98}{19}\");",
        "// >>>>>",
        "v.title=...;",
        "// <<<<<"
    ],
    "fullStatements": [
        "Please enable config.extendedErrorLogging to see full statements."
    ]
}

Steps to Reproduce

  1. Copy this file to your OneDrive: inline-content-controls.docx
  2. Open the file in Word Online
  3. Run the live example with Script Lab: https://gist.github.com/a855748e684e1a03e93011da5be2544a

Context

We have customers that create a document on Word for Windows using both inline and block Content Controls. This document is then further manipulated on Word Online by another user. When our add-in tries to manipulate all Content Controls, Word Online fails when it encounters an inline Content Control.

Your Environment

  • Platform: Office Online
  • Host: Word
  • Office version number: Build 16.0.10705.32651
  • Operating System: Windows 10
  • Browser: Chrome
1 Upvote
Comment
Similar Ideas
No similar ideas