D
Debra Farnham
Hi All (again)
Win2K Word2K
I am attempting to write some code that will:
1. Find the previous page break and replace it with a next page break
2. Create a header in the last section of the document that includes the
word Page, the page number and some other text. (the other text will be
broken up over a couple of lines)
This is where I'm at so far:
****************************************************************************
********
'Removes previous page break, inserts next page section break and sets
header NOT to same as previous
Dim intSection as integer
Application.Browser.Previous
Selection.TypeBackspace
Selection.InsertBreak Type:=wdSectionBreakNextPage
intSection = ActiveDocument.Range(0,
Selection.Sections(1).Range.End).Sections.Count
ActiveDocument.Sections(intSection).Headers(wdHeaderFooterPrimary).LinkToPre
vious = False
ActiveDocument.Sections(intSection).Headers(wdHeaderFooterPrimary).Range.Tex
t = vbTab & "Page "
****************************************************************************
**************
I'ts not very pretty (at least the replacing of the page break) and I'm
wondering if there is a "smoother" way of doing that AND I'm stumped as to
how to get the page number in after the word "page" along with some other
text.
TIA for any assistance you can provide.
Debra
Win2K Word2K
I am attempting to write some code that will:
1. Find the previous page break and replace it with a next page break
2. Create a header in the last section of the document that includes the
word Page, the page number and some other text. (the other text will be
broken up over a couple of lines)
This is where I'm at so far:
****************************************************************************
********
'Removes previous page break, inserts next page section break and sets
header NOT to same as previous
Dim intSection as integer
Application.Browser.Previous
Selection.TypeBackspace
Selection.InsertBreak Type:=wdSectionBreakNextPage
intSection = ActiveDocument.Range(0,
Selection.Sections(1).Range.End).Sections.Count
ActiveDocument.Sections(intSection).Headers(wdHeaderFooterPrimary).LinkToPre
vious = False
ActiveDocument.Sections(intSection).Headers(wdHeaderFooterPrimary).Range.Tex
t = vbTab & "Page "
****************************************************************************
**************
I'ts not very pretty (at least the replacing of the page break) and I'm
wondering if there is a "smoother" way of doing that AND I'm stumped as to
how to get the page number in after the word "page" along with some other
text.
TIA for any assistance you can provide.
Debra