Out of Stack Space????

J

jerem

I have this code below which gets me into the Header rather than going
through the toolbar but the problem is once I get into the header, the header
toolbar Close button is deactivated, I can't get out of the header area and
the document locks up. This then generates an Out of Stack Space message
with this: "ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader" line highlighted in yellow. Any one out there know
what's going on with this and how to solve this. Thanks in advance for your
help.

Sub ViewHeader()
'
' ViewHeader Macro
' Macro recorded 9/16/2008 by dwallace
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End Sub
 
J

Jonathan West

Can I ask you to take a step back, and ask what you are trying to achieve
overall? I suspect that this macro is part of a wider task and I'm wondering
what that is. I suspect that approaching the problem from a different angle
might offer better results.
 
J

jerem

There's nothing elaborate about this one - I just want to assign a quick
shortcut key to get into the Header and this was the way I had done it
before. Now for some reason it gets me into the Header (as I want to do
without having to use View, Header/Footer) but it deactivates the Close
option on the toolbar as well as locking up the document. Very strange -
I've recently been adding several macros to my normal.dot - whether this has
anything to do with this, I don't know - but I was thinking this might have
something to do with it -- although I can't imagine that the macros I've
added have used up too much space. Very curious.

I also wanted to assign a quick shortcut key to insert cross references
which I've had before as well. Can't seem to get that to work either.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top