As you are talking of documents, I assume you are talking of Word. Couple of
things to try.
1. Check that the ActiveWindow.Visible property of the document is True
2. Check that the ActiveWindow.WindowState is not wdWindowStateMinimize
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML