MS Office Forum / Word / Page Layout / January 2007
Way to force sections to have even number of pages?
|
|
Thread rating:  |
themint100 - 26 Jan 2007 01:22 GMT 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
Suzanne S. Barnhill - 26 Jan 2007 01:32 GMT 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.
 Signature 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.
> I'm creating a document that contains several sections, one for each chapter. > Each chapter should start on an odd page (right page). [quoted text clipped - 11 lines] > > -Greg themint100 - 26 Jan 2007 03:03 GMT 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
> 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. [quoted text clipped - 18 lines] > > > > -Greg Suzanne S. Barnhill - 26 Jan 2007 03:24 GMT 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.
 Signature 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.
> Hi Suzanne, > [quoted text clipped - 30 lines] > > > > > > -Greg dogwoodnc - 26 Jan 2007 03:26 GMT 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!
> Hi Suzanne, > [quoted text clipped - 30 lines] > > > > > > -Greg Suzanne S. Barnhill - 26 Jan 2007 04:28 GMT Sometimes recorded macros don't work as expected. See http://word.mvps.org/FAQs/MacrosVBA/ModifyRecordedMacro.htm
 Signature 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.
> 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 [quoted text clipped - 53 lines] > > > > > > > > -Greg dogwoodnc - 26 Jan 2007 11:59 GMT 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!
> Sometimes recorded macros don't work as expected. See > http://word.mvps.org/FAQs/MacrosVBA/ModifyRecordedMacro.htm [quoted text clipped - 73 lines] > > > > > > > > > > -Greg Stefan Blom - 26 Jan 2007 12:13 GMT 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
 Signature Stefan Blom Microsoft Word MVP
> 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 [quoted text clipped - 104 lines] > > > > > > > > > > > > -Greg dogwoodnc - 26 Jan 2007 14:01 GMT 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!
> 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 [quoted text clipped - 166 lines] > > > > > > > > > > > > > > -Greg Stefan Blom - 29 Jan 2007 09:27 GMT 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
 Signature Stefan Blom Microsoft Word MVP
> 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 [quoted text clipped - 147 lines] > > > > > > > "themint100" <themint100@discussions.microsoft.com> wrote in > > message news:679975F0-242A-419F-BDC4-1D3AF23F1F33@microsoft.com...
> > > > > > > > I'm creating a document that contains several sections, > > one for each [quoted text clipped - 30 lines] > > > > > > > > > > > > > > > > -Greg
|
|
|