Find and replace on multiple footnotes in Word

Hello, I was wondering how to do a find and replace on several footnotes at a time in Word via Applescript. I need to do several replacements each on documents with a large number of footnotes. If I try doing it one text replacement and one footnote at a time, it is very cumbersome and then usually Word crashes at some point after a few hundred replaces.

I am new to AppleScript, so I figure that I am missing something. Also, as a related issue, how can you even select multiple footnotes at a time in Word through AppleScript. I tried to move the range end by an item count of 2 (or any number), but it returns that “Microsoft Word got an error: missing value doesn’t understand the move end of range message.” Thank you very much for any help! :slight_smile:

I assume that you already looked at the daunting documentation available here for scripting Word? Although tedious, you can sometimes find good clues or examples to help out.

It would also be helpful to post some code you may already have for someone here to look at.

Well, I have looked at the documentation provided by Microsoft for Word, and the closest line is to this is: “set myRange to move end of range myRange by a paragraph item count 2”. When trying to adopt this for footnotes, by simply replacing “paragraph” with “footnote”, it gives me the missing value error message as described above.