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 / Programming / November 2005

Tip: Looking for answers? Try searching our database.

Setting some headers and footers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sol Apache - 02 Nov 2005 11:51 GMT
I have a template with three sections and a userform from which the front
page title, mmm yyyy, and various headers are automatically inserted.

The first two sections have headers and footers different from the third
section¹s - which starts the main part of the document - and so section 3Œs
header and footer are not set to ³same as previous².

The form works fine if a document has only three sections.

The problem is that if the user adds new sections after the third, or pastes
or imports from other documents, then the headers may not be the same as
those in section 3 (all headers and footers from the third section onwards
should be the same).

Also the userform can be used over and over to change the front page title
and the headers of the first three sections but when there are more than
three, then they may not change.

How can I set the macro to change the headers and footers from the third
onwards? There can be any number of sections after the third section.  I
guess I need a line of code which says all headers and footers after section
3 should be the same as those of section 3 and/or a loop. I do not know how
to do this.

Thanks for any help

Sol
Jezebel - 02 Nov 2005 13:00 GMT
Dim pSection as long

for pSection = 3 to activedocument.Sections.Count
   ActiveDocument.Sections(pSection).Footers(wdHeaderFooterPrimary). .....
Next

>I have a template with three sections and a userform from which the front
> page title, mmm yyyy, and various headers are automatically inserted.
[quoted text clipped - 27 lines]
>
> Sol

Rate this thread:






 
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.