page number messed up by section break

A

Associates

Hi,

I have a word document that consists of three sections, covering page, TOC
and sections or chapters.

Each of these sections have a different footer among themselves. And I use
autotexts made up for each one. So when user wants to add/insert a new
section, he or she can just click a macro that will insert the section by
means of autotexts as shown below

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

Each of these sections ends with a section break (next page). My concern is
that there is a blank page at the very end of the document because of the
section break (next page). When i deleted it, the page number gets stuffed up
for the whole section.

The Page number for TOC has the format as i, ii, etc. Sections/Chapters, on
the other hand, use the numbering system such as page 1, page 2, and so on.

For example, say the last page for TOC is "Page ii", then followed by the
first page of a new section ideally. But instead, the first page of the
section becomes "Page iii"

I tried to use macro recording to fix the footer but unable to do that as it
did not allow me to access to the footer.

My question is whether there is a way of using VB codes to get into the
footer to change the page number format.

Any helps would be greatly appreciated.

Thank you in advance
 
D

Doug Robbins - Word MVP on news.microsoft.com

Use code such as the following to change the .SectionStart attribute of the
last Section in the documnet to Continuous

With ActiveDocument
.Sections(.Sections.Count).PageSetup.SectionStart = wdSectionContinuous
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
A

Associates

Thank you Doug for your reply.

It works really well. That's what i wanted to see. Doug, how do i do that
without the code? I mean in a normal word document, if someone is having the
same problem, i would like to help them out. I tried to manually change the
section to continuous under Page setup (by understanding how your code works)
but to no avail. I made sure my cursor was in that page but it did not work.

Thank you in advance
 
D

Doug Robbins - Word MVP on news.microsoft.com

You would need to put the cursor in the last page=section of the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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