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
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