problem with page numbering

D

daniel lie

Hi,

I have a problem with the page numbering in the footer of the word document.
The problem is that it always starts at 1 rather than continue from previous
section.

This is what happens. I have an autotexts that has a specific outlined
styles created and called it "Section 1 Heading".

Then, i added this autotexts to my own template by using the following code
(by the way, in the template, i have the same outlined styles created and
named it the same as "Section 1 Heading").

ActiveDocument.AttachedTemplate.AutoTextEntries("mySections").Insert Where:=
_
Selection.Range, RichText:=True

so far so good, it worked fine. Then, i then created another code to let
user to insert a new section by using the following code:

' Insert a heading for the new section.
Selection.Style = ActiveDocument.Styles("Section Heading 1")

' Add a paragraph break to return to "Normal" text.
Selection.InsertBreak Type:=wdSectionBreakNextPage

Selection.TypeText Text:=InputBox("Please enter section heading:", "Enter
Section Heading")

This added in a new section to the document however the page numbering shows
"Page 1" rather than "Page 2". Shouldn't it continue because i checked to
see if it has "same as previous" on the footer and it was. But don't
understand why the page numbering doesn't work. Is it because it's different
outlined styles? if it was, i don't understand why it shows "Section 2"
after adding the new section because "Page 1" shows "Section 1".

I know that my knowledge of words is not that great but am willing to learn
from you experts.

Thank you in advance.

url:http://www.ureader.com/gp/1012-1.aspx
 
D

daniel lie

Hi,

It works now after spending an hour thinking what causes it not to work.
It's to do with break type. Initially, i used the section break. This didn't
work as described previously. I then changed this to page break and it works
fine.

Thank you for your time and help.

url:http://www.ureader.com/msg/1012670.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top