?
Solved

How to Change Headers in word on different pages

Posted on 2003-03-03
10
Medium Priority
?
200 Views
Last Modified: 2010-05-01
Hello, I was wondering if anyone knew the code to place different headers on different pages in Word 2000.  I've tried all types of code but it changes the Headers for ALL pages whenever it run...please help!
0
Comment
Question by:TyWatts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
10 Comments
 
LVL 1

Expert Comment

by:Ess
ID: 8059223
In word 2000 all headers are the same for each section.  You can change headers for the first page or on odd or even pages but not each individual page.  What you need to do is break your document into individual sections for each page by inserting a section break for each page.  Then you can have different headers for each page.  Use the InsertBreak method to insert individual section breaks.
0
 

Author Comment

by:TyWatts
ID: 8059333
Okay, I'm implementing that now...
0
 

Author Comment

by:TyWatts
ID: 8059576
Okay, I'm implementing that now...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:TyWatts
ID: 8059589
That is not working for me.  Here is the blocks of code I'm using
-----
'sets the header
Sub Set_Header(vHeadertxt2)

  ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
   Selection.HeaderFooter.Range.Text = vHeadertxt2
   ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

---
'break
Sub Break()

'    Selection.InsertBreak Type:=wdPageBreak
    Selection.InsertBreak Type:=wdSectionBreakNextPage

   
    'StartProgram
    Set_Up_Dlg
End Sub
----

i'm still ending up with the same problem repetitive headers
0
 

Author Comment

by:TyWatts
ID: 8059639
That is not working for me.  Here is the blocks of code I'm using
-----
'sets the header
Sub Set_Header(vHeadertxt2)

  ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
   Selection.HeaderFooter.Range.Text = vHeadertxt2
   ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

---
'break
Sub Break()

'    Selection.InsertBreak Type:=wdPageBreak
    Selection.InsertBreak Type:=wdSectionBreakNextPage

   
    'StartProgram
    Set_Up_Dlg
End Sub
----

i'm still ending up with the same problem repetitive headers
0
 

Author Comment

by:TyWatts
ID: 8059788
I just made a small procedure block to do what was asked and this is still giving me repetative headers.

----------

Option Explicit

Dim count As Integer

Public Sub test()

count = count + 1
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
activewindow.ActivePane.View.

   Selection.HeaderFooter.Range.Text = count
   ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
  Selection.InsertBreak Type:=wdPageBreak
'  Selection.InsertBreak Type:=wdSectionBreakContinuous

end sub


---------

frustration is setting in, someone please help!
0
 
LVL 3

Expert Comment

by:DocM
ID: 8059883
Ess is right. On the Header and Footer toolbar, make sure Same as Previous  is not selected.
0
 
LVL 1

Expert Comment

by:Ess
ID: 8060779
If you need to set the new header in the new section to not the same as previous, use the headerfooter object property LinkToPrevious = False.
0
 
LVL 1

Accepted Solution

by:
Ess earned 100 total points
ID: 8060810
Instead of using wdSectionBreakContinuous why not use wdSectionBreakNextPage and eliminate the page break.
0
 

Author Comment

by:TyWatts
ID: 8064064
okay thanks Ess I appreciate it, and the 25 is yours.  Thanks again!
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question