Using the Word JavaScript API, how can I get a range in one document that corresponds to the range in an identical document?

I need to be able to grab the range of a comment in one document and find the corresponding range in a “comment-free” copy of the document.

I’ve got this working using the text search approach, but I’m trying to come up with a solution that can handle ranges that include other objects such as images.

Can anyone suggest another approach? The challenge is there isn’t a way to capture the starting and ending index of a range.