Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Long Documents / January 2004

Tip: Looking for answers? Try searching our database.

Help with footers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JJaster - 30 Dec 2003 20:38 GMT
I need some help with form footers.  I have a document that creates by
pulling in bookmarked text.  I need to be able to automatically add a
formfooter to each page of each section.  The footer need to stay the
same throughout the section and then change at the new section.  I've
tried numerous ways to get this to work, but it always ends up changing
the footer throughout the document or combining the footers whenever I
try to add a new footer (regardless if I turn the 'link to previous'
off or not).  Following is a sample of my code.  In this sample I tried
to go to the next section before adding the footer, but I have the same
problem as when I view next formfooter
(ActiveWindow.ActivePane.View.NextHeaderFooter).  Can someone please
let me know what I'm doing wrong or if there is a better way to do
this?  Any help is greatly appreciated!  I'm working in Word 97.

Judy

ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageFooter
End If

Selection.HeaderFooter.LinkToPrevious = Not Selection.HeaderFooter.
_
LinkToPrevious
Selection.TypeText Text:="DEF"

Selection.GoToNext what:=wdGoToSection
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Selection.HeaderFooter.LinkToPrevious = Not Selection.HeaderFooter.
_
LinkToPrevious
Selection.TypeText Text:="SPEC"

------------------------------------------------
Suzanne S. Barnhill - 31 Dec 2003 06:06 GMT
I'm not sure whether it would be applicable for what you're doing, but an
easy way to get header/footer text to change without having to fool with
unlinking sections is to use the StyleRef field (which see in Word's Help).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


> I need some help with form footers.  I have a document that creates by
> pulling in bookmarked text.  I need to be able to automatically add a
[quoted text clipped - 31 lines]
>
> ------------------------------------------------
Charles Kenyon - 31 Dec 2003 22:35 GMT
First, check out the StyleRef field as suggested. It may even obviate the
need for the section breaks.

Otherwise, what you should be working with is the various ranges in your
sections. Check out the articles on the MVP site on working with ranges.
(Your code reflects the code that Word writes when you record a macro
dealing with headers/footers. This code is unnecessarily difficult to use.
After you've looked at those articles, I would suggest reposting in the
vba.beginners newsgroup.
Signature


Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> I need some help with form footers.  I have a document that creates by
> pulling in bookmarked text.  I need to be able to automatically add a
[quoted text clipped - 31 lines]
>
> ------------------------------------------------
JJaster - 14 Jan 2004 16:28 GMT
Thanks for the suggestions.  I was able to achive what I was wanting
using the following code:

With ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary)
.LinkToPrevious = False
.Range.Text = "NEL-CP!(04-00)"
End With

'TOC
With ActiveDocument.Sections(2).Footers(wdHeaderFooterPrimary)
.LinkToPrevious = False
.Range.Text = "NEL-TOC(04-00)"
End With

------------------------------------------------
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.