Oops, sorry, this actually was a rhetorical question to myself as I tried to figure out if there is a really easy way to do this, and I can't see it (numlines is part of the stats in the *.doc's properties)...
This 'eight queens' problem has been used in many programming classes, though not in any class, I have taken. Anyway, I have a solution already (and will gladly share), but, I kinda sorta wanted to know if there are any other more 'elegant' solutions.
useless, but. take a checkerboard. 8X8 squares = 64 squares (color 'em any way u want) learn chess, else..., nevermind. place 8 queens on checkerboard in such a manner that NO queen can capture a queen on any queen's next move. try it yourself, then do it in java.
short answer: no long answer: maybe, but not likely. here's why. the # of lines in a word*.doc is relative. why do you even want to do this? you ask a lot of questions...