Since 1000! has 164 factors of 7 and 500! has 82 factors of 7,
\(\frac{1000!}{(500!)^2}\) has \(164 - 82 - 82 = 0\)
factors of 7.
In other words, all the factors of 7 cancel,
so the greatest power of 7 dividing \(\frac{1000!}{(500!)^2}\)is 7^0 = 1,
so \(n = \boxed{0}.\)