Add Index to Word.NoteItem object

Add Index to Word.NoteItem object
0

Upvotes

Upvote

 Apr 29 2024
0 Comments 
New

In the office-js api there's no way to get the index of a NoteItem (ie. Footnote, etc). If you want to get the index you have to load all the footnotes then loop through each to get the index which has performance implications over time. It would be nice once you create a footnote you could get the index right away. 

Example: 

const footnote = range.insertFootnote();

/* What is the footnote number? If it number 5? Number 4? The only way for me to retrieve it would be to load all the footnotes and loop through each */