At the risk of evoking a large, collective sigh from the Windoze community, it's relatively easy to do something that with StarOffice/OpenOffice.org (OOo). The file format is a zipped collection of XML files, so it's all text-accessible. A simple unzip/grep combination at the Linux command line and you've got a good first shot at that information.
I'm not writing applications from scratch much these days, but for a while I was writing 2-3 a week, and when I did, I used to insert merge fields having names that were reminiscent of the element they represented into my documents instead of adding the reference numbers directly. Typing <right framastat bracket> was slower than typing "32" but when proof reading I could easily spot when a reference was used incorrectly. Word also has some facilities that allow inserting field names after you've used them once.
I then used a macro to read tables of assigned field names and corresponding reference numbers to merge the reference numbers into the document before submitting the thing to be reviewed. The table was also useful for communicating with the draftsperson (a third column had a description of the element. My own sketches can be pretty awful) and for reminding me what I was calling stuff while writing the application. And of course I could easily reassign the reference numbers if necessary or if it improved readability. I could also grab some stock stuff (like descriptions of a general purpose computer) without worrying about having to change the reference numbers.
I wrote other macros to make sure that my table didn't assign duplicate reference numbers, that all assigned reference numbers were used at least once, and to check for a few other problems that cropped up.
In fact pretty much every time I ran into or was able to predict a reference number related problem, a few lines of visual basic made sure it never happened again. It was a type of penance for my transgressions because I loathe programming in visual basic.
I don't think I could find any of that code now. It's probably on a CD or DVD somewhere, but I don't use it.