A
Associates
Hi,
I need help with accessing to the Footer in the word. I have a template that
allows users to create a report for them. The report is made up of sections
such as Preface, Executive Summary, Sections, and so on in that order. The
way it inserts the sections in the report is by using autotexts. So i have
autotexts for Preface, autotexts for Executive Summary, and so on.
My problem is with the page number in the footer for these sections in the
report. When the user select Preface, the page number of the Preface should
start with number 1. The rest of the sections will have their page number set
to continue. If the user starts the report by selecting Executive Summary,
then the page number will start with number 1 in the Executive Summary's
footer. The rest of the sections after Executive Summary section will
continue from there.
Here is my code to insert 'preface'
ActiveDocument.AttachedTemplate.AutoTextEntries("preface").Insert _
Where:=Selection.Range, RichText:=True
'ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
'With Selection.HeaderFooter.PageNumbers
' .NumberStyle = wdPageNumberStyleArabic
' .HeadingLevelForChapter = 0
' .IncludeChapterNumber = False
' .ChapterPageSeparator = wdSeparatorHyphen
' .RestartNumberingAtSection = True
' .StartingNumber = 1
'End With
I tried with the code that are commented but did not get it to work.
Thank you in advance
I need help with accessing to the Footer in the word. I have a template that
allows users to create a report for them. The report is made up of sections
such as Preface, Executive Summary, Sections, and so on in that order. The
way it inserts the sections in the report is by using autotexts. So i have
autotexts for Preface, autotexts for Executive Summary, and so on.
My problem is with the page number in the footer for these sections in the
report. When the user select Preface, the page number of the Preface should
start with number 1. The rest of the sections will have their page number set
to continue. If the user starts the report by selecting Executive Summary,
then the page number will start with number 1 in the Executive Summary's
footer. The rest of the sections after Executive Summary section will
continue from there.
Here is my code to insert 'preface'
ActiveDocument.AttachedTemplate.AutoTextEntries("preface").Insert _
Where:=Selection.Range, RichText:=True
'ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
'With Selection.HeaderFooter.PageNumbers
' .NumberStyle = wdPageNumberStyleArabic
' .HeadingLevelForChapter = 0
' .IncludeChapterNumber = False
' .ChapterPageSeparator = wdSeparatorHyphen
' .RestartNumberingAtSection = True
' .StartingNumber = 1
'End With
I tried with the code that are commented but did not get it to work.
Thank you in advance