View Single Post
  #9   Report Post  
Posted to microsoft.public.word.pagelayout
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Way to force sections to have even number of pages?

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!


"Stefan Blom" wrote:

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.OddAndEvenPagesHeaderFoot er = True

and/or

ActiveDocument.PageSetup.MirrorMargins = True

--
Stefan Blom
Microsoft Word MVP


"dogwoodnc" wrote in message
...
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!


"Suzanne S. Barnhill" wrote:

Sometimes recorded macros don't work as expected. See
http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup so
all may benefit.

"dogwoodnc" wrote in message
...
I have a similar difficulty, but with a slight twist. When I

manually
insert
an Odd Section Break (InsertBreakOdd 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 (InsertBreakOdd 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!


"themint100" wrote:

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

"Suzanne S. Barnhill" wrote:

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.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to

the
newsgroup so
all may benefit.

"themint100" wrote in

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