Way to force sections to have even number of pages?

T

themint100

I'm creating a document that contains several sections, one for each chapter.
Each chapter should start on an odd page (right page).

The Section > Odd Page forces the next section to start on an odd page,
which is correct, but does not insert the (expected) intervening even page.

So if I have Chap 1 and it goes from pages 1-9, the first page does start at
page 11, but no page 10 is inserted. Right now, I have to go through the
whole doc and insert page breaks manually...or remove them if the page count
has changed and ended up even (but forced to odd with the page break).

Basically, I want to know if there's anything that automatically forces a
section to have an even number of pages.

-Greg
 
S

Suzanne S. Barnhill

Page 10 *is* inserted, but you won't see it except in Print Preview if you
have two pages displayed. The blank page will print, however.
 
T

themint100

Hi Suzanne,

Sheesh, you gotta be kidding me. OK, I can see the page if I do Print
Preview, but not in Print Layout.

However, the inserted page does not display the proper headers/footers for
an even page, it's completely blank. Anyway to force the non-viewable
intervening page to take on the default characteristics of an even page? This
is for a printed manual, and blank pages are a no-no.

-Greg
 
S

Suzanne S. Barnhill

Blank pages are not supposed to have a header and footer; they're supposed
to be blank. Look at any proper book that has every chapter start on a recto
page, and you will see that this is the case. If you are creating one of
those stupid books that have to say "This page intentionally left blank,"
see http://word.mvps.org/FAQs/TblsFldsFms/InsEvnPgEndChap.htm.
 
D

dogwoodnc

I have a similar difficulty, but with a slight twist. When I manually insert
an Odd Section Break (Insert>Break>Odd Section Break), the sections are
formatted and printed correctly, with a blank page inserted after sections
ending on odd pages so new sections always start on the right side.

However, when I use a macro to add an Odd Section Break, the section break
looks ok in the doc itself (ie it shows "Odd Section Break" coding, and the
Task Pane also shows that it's an Odd Page break); however, it acts more like
a "Next Page Break". Blank pages are not inserted after odd pages when
printed, and pagination continues (ie 1,2 instead of 1,3).

I've tried different variations of macros -- from recording the actual
keystrokes (Insert>Break>Odd Section Break), to keying the macro code itself
(Selection.InsertBreak Type:=wdSectionBreakOddPage).

I don't understand why the odd section break works properly when it is
inserted manually but not when it's in a macro -- especially when the
keystrokes from the one that works are recorded to make the macro!

Can you provide any insight?

Thanks in advance!
 
D

dogwoodnc

Yes, I understand that. If the macro has other lines of code, it is quite
possible for other things to be 'buried' in the code. However, I've tried
even with a macro that only has the recorded keystrokes to insert an Odd
Section Break:

Sub SecBrkOddPg()
Selection.InsertBreak Type:=wdSectionBreakOddPage
End Sub

I've also searched every module to see if there are any references to any
other section breaks, but there do not appear to be any conflicts.

When you view the document itself, the Odd Section Break formatting mark
appears in the correct location. However, it does not function as an Odd
section break, but rather as a Next section break. In Print Layout view, both
the document created with manual Odd section breaks and the document created
with automated (via macro) Odd section breaks appear the same -- all visible
formatting marks seem to be identical, and all settings in the Formatting
task pane are the same -- with the exception of the page numbers. However,
in Print Preview, it's obvious that the manual one has inserted blank pages
where they're supposed to be, and the automated one has not.

Any other ideas?

Another question -- is there an 'easy' way to programmatically (via macro)
to replace all section breaks with Odd section breaks? The Find/Replace
function allows you to search for and replace 'generic' section breaks, but I
don't see an option to specify the type of break.

Thanks!
 
S

Stefan Blom

In the document where section breaks are created with a macro, did you
remember to specify at least one of the "Different odd and even" and
"Mirror margins" options (in File | Page Setup)? This ensures that odd
(and even) section breaks behave correctly.

In VBA:

ActiveDocument.PageSetup.OddAndEvenPagesHeaderFooter = True

and/or

ActiveDocument.PageSetup.MirrorMargins = True

--
Stefan Blom
Microsoft Word MVP


in message
 
D

dogwoodnc

Aha, that's the key! I hadn't been aware that I needed to do that, figuring
that the section break setting should have been adequate. I added that line
of code, and it works great now -- THANKS!

One more question. Is there a way (preferrably programmatically) to specify
that when the printer is duplexing, the blank pages should be inserted, but
when the printer does not have duplex capability, the blank pages are
omitted? That might be asking for too much, but it would be helpful. Some
users (of the same documentation) have duplex capabilities, and some don't.

Or, alternatively, if there is an easy way of changing all Odd section
breaks to Next section breaks, that should accomplish the same thing with
minimal effort.

THANKS again!
 
S

Stefan Blom

I don't know if there is a way to detect whether a printer supports
duplexing or not.

However, there *is* a way to turn duplex printing on or off; see
http://word.mvps.org/faqs/macrosvba/SetDuplexOnOff.htm.

And changing the type of sections can be accomplished with a
simple macro:

For Each s In ActiveDocument.Sections
s.PageSetup.SectionStart = wdSectionNewPage
Next s

--
Stefan Blom
Microsoft Word MVP


in message
 

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