Insert text into ContentControls in Word Online via Office Add-In and JS Word API

According to the JavaScript API for Word documentation, under 'Known issues', ContentControl.insertText should be supported in the Word Online environment so long as 'Replace' is used as the insertLocation.  However, any attempt to do this results in the following exception:

  1. code:"NotAllowed"
  2. errorLocation:"ContentControl.insertText"
  3. message:"The action isn’t supported in Word Online. Check the OfficeExtension.Error.debugInfo for more information."

For reference, the code from the documentation provided as an example of how to use 'insertText' will throw this error.  I am curious as to whether or not this is a bug in the API or error in the documentation.  Are there plans to support this feature in the Online environment?  In the meantime, are there any recommended workarounds?

Thanks!

Dan

 

Question Info


Last updated July 2, 2019 Views 52 Applies to: