PropertyNotLoaded Error Persisting after calling load and context.sync

Preeti Pidatala 6 Reputation points
2022-07-28T23:43:41.22+00:00

I am creating a Word add-in using the javascript API. I am hitting a 'PropertyNotLoaded' error when trying to access items within my rangeCollection. As far as I can tell, I have loaded items/text and have called await context.sync() before I use the item values.
225991-image.png

This is the specific error I see:

Error: PropertyNotLoaded: The property 'items' is not available. Before reading the property's value, call the load method on the containing object and call "context.sync()" on the associated request context.

taskpane.js:412 Debug info: {"code":"PropertyNotLoaded","message":"The property 'items' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.","errorLocation":"RangeCollection.items"}

I'd appreciate any guidance on resolving this issue.

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,228 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Peter Kipp 0 Reputation points
    2025-01-30T20:27:39.16+00:00

    having the same error here
    were you able resolve this?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.