S
SWT
I'm having trouble with the Word view type changing upon selecting a range.
To be more specific, I'm working with footers, and when I set a range in the
footer and select it, the word.ActiveWindow.View.Type changes and also opens
up a little footer window. Here is the code I use to solve this problem...
Dim view As Word.WdViewType
Set view = Word.ActiveWindow.ActivePane.View.Type
range.Select
Set Word.Selection.Style = Word.ActiveDocument.Styles "Normal"
Word.ActiveWindow.ActivePane.Close
Set Word.ActiveWindow.ActivePane.View.Type = view
What I am looking to do is either find out a way to not allow the view type
to change upon selecting a range, or to not allow Word to update the view
type change right away. The reason why I need this is because I go through
10+ footers, some with different first pages, and it has to run this code for
each footer range.
Thanks for the help in advance
To be more specific, I'm working with footers, and when I set a range in the
footer and select it, the word.ActiveWindow.View.Type changes and also opens
up a little footer window. Here is the code I use to solve this problem...
Dim view As Word.WdViewType
Set view = Word.ActiveWindow.ActivePane.View.Type
range.Select
Set Word.Selection.Style = Word.ActiveDocument.Styles "Normal"
Word.ActiveWindow.ActivePane.Close
Set Word.ActiveWindow.ActivePane.View.Type = view
What I am looking to do is either find out a way to not allow the view type
to change upon selecting a range, or to not allow Word to update the view
type change right away. The reason why I need this is because I go through
10+ footers, some with different first pages, and it has to run this code for
each footer range.
Thanks for the help in advance