|
Visual Basic (VB and VBA) |
|
Copyright 1999-2001 Christopher Greaves. All rights reserved. Home Page and email to [email protected] |
| If in doubt, record a macro and inspect the entrails! |
Please read the DISCLAIMER.
Here is an INDEX to all the procedures.
You will probably need one copy of my GLOBAL DECLARATIONS.
Public Function boolOpenHeaderFooter(lngType As Long) As Boolean
' Procedure : boolOpenHeaderFooter
' Description: Enter either the header or the footer.
' Copyright: Chris Greaves Inc.
' Inputs: long: wdSeekCurrentPageHeader or wdSeekCurrentPageFooter
' Returns: TRUE if any split panes were closed.
' Assumes: Nothing
' Side Effects: May move the insertion point into a header, footer, may switch to page view.
' Tested: By the calls shown below.
boolOpenHeaderFooter = False ' default is "we found no panes"
While ActiveWindow.Panes.Count > 1 ' close any extra panes.
boolOpenHeaderFooter = True ' "we found at least one extra pane"
ActiveWindow.Panes(2).Close ' keep closing any beyond Panes(1)
Wend
ActiveWindow.ActivePane.View.Type = wdPageView ' force page view
ActiveWindow.ActivePane.View.SeekView = lngType
'Sub TESTboolOpenHeaderFooter()
' MsgBox boolOpenHeaderFooter(wdSeekCurrentPageHeader)
' MsgBox boolOpenHeaderFooter(wdSeekCurrentPageFooter)
'End Sub
End Function
| We all knew nothing when we started … |
|
Home Page and Contact Information Send email to [email protected]. This page was last updated Thursday, November 15, 2001 |