"Repair Permissions" is a bit of a last-ditch attempt. You're right, it often doesn't fix the problem. Then again, fiddling with maxfiles never does. At best it's likely to give you out-of-memory lockups and slowdowns.
If there were any "science" behind Repair Permissions, it would be that it stirs up the insides of the system sufficiently to force OS X to fix the problem :-) A bit like Homeopathy, a little bit of poison to force the body to repair itself. And Repair
Permissions is totally non-destructive, so the worst that can happen is "nothing". Costs nothing, does no harm, and it might work -- what's not to like?
The first problem we strike here is that the error message is WRONG. Sorry: there's no kinder way to put it -- this error has nothing to do with how many files are open (which is why maxfiles won't fix it).
What HAS happened is that Word has requested an "edit lock for write" on a file. It may be trying to create a temporary file, or lock an existing one for writing. The error message can't tell us.
The operating system has replied with something cryptic such as "Unable", "Unavailable", or "In Use". We can't tell, neither can Word.
Back when this error message was written (the code for parts of Word is older than the people working on it, now...) the most likely reason an operating system "couldn't" give you a new file is that there were too many already open. Not the case today.
We don't know what the problem is. The system won't tell us. Word can't tell us. The only thing we know for sure is that the error message is wrong. Maxfiles is set to the default of 256 on my system and I have never seen the error.
While we don't know what's caused it, I can suggest some things you can try to make it less likely to happen again (as I said, I have never seen it...)
- Repair Permissions, if you have not already. Especially if you have upgraded to Mavericks! Under some circumstances the Mavericks upgrade seems to mis-set some permissions in the System and Applications folders, and this can cause a lot of mystifying
error messages.
- Re-start the system. This error frequently results from files that have been locked and are now refusing to unlock. Especially if you have Mavericks and have AppNap enabled. Restart down to power-off and back up again: no lock on the system can survive
that.
- Quit applications you are finished with, instead of just minimising. When you minimise an application, all its temporary files may remain open. If you quit it, you give the OS's garbage collection routines time to clean up both the memory and the temp
files it was holding.
- At the end of the working day, Log Out, instead of just closing the lid. When you log out, you trigger a system clean-up process that does things like clean up open temporary files, compact fragmented memory, and release locked files. It also means
your user-ID is not sitting there all night logged in on an unattended computer presenting a juicy attack surface for the bad guys.
- At the end of the working week, shut down the computer. Same thing as 2, but if you do it at the end of the week when it is convenient, you will never have to do it during the week, when it isn't. For extra-credit, you do not leave a running computer
connected to the Internet so the bad guys can hammer away at it all weekend while you are not watching.
These are the things I do, and like I said, I have never had this error. At least, I have never had it on the Mac: I have had it on the PC, and I know what caused it: my bad coding, back when the PC had a limit of 60 open files!
Hope this helps