You might do better to hook into the WindowActivate(ByVal Doc As Document, ByVal Wn As Window) event and run your code against whatever window is active. You should be able to use:
Wn.View.ShowHeading x
Wn.DocumentMap = True
from there.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|