This sounds odd.
" I reopened an unmodified version of the document, and found that ALL my VBA code has vanished."
If it was unmodified, I have to assume that means unmodified with having your VBA code. This seems unlikely if you have been at it for weeks. Surely you must have saved the file during this time, and therefore it was modifed with the VBA code. Yes?
Are you saying unmodifed means it is a file from weeks ago, before you did any VBA?
If this is the case, then you are out of luck.
HOWEVER, if Word crashed, what happened when you started it up again? It did not offer you a recovery file?
You can possibly look for it in your recovery folder..maybe. But if you opened an unmodified file, you may be out of luck.
I am curious though as to what you may have been doing to have such a drastic effect. A Ctrl-End causing a crash seems VERY drastic, and unlikely...but - shrug - it IS Word. Why, specifically, was the cursor even moved at all?
So...what was your macro trying to do?
Like anything else, it is a good idea to save the file periodically. The save will save your VBA. If you are really cautious (and if you are writing massive amounts of code, although 2000 lines is a lot, it is not overly huge), it is also a good idea to export your code to .bas (and .frm) files - just in case. I do.
BTW: if you are doing a lot of code, with a lot of rewrites, it is also a good idea to export and import all your code, every once in a while. Word tends to bloat itself (surprise surprise). See
VBA Code Cleaner. You can of course do your own export/import. Not only does this keep things cleaner, smaller, but it also acts as a backup for your code.
Good luck.
<
60 50 40 working days until retirement; with 87 accumulated sicks days. Know what? I am not feeling well.