×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

odd page + fields (Word VBA)

odd page + fields (Word VBA)

odd page + fields (Word VBA)

(OP)
I'm writing a template for a manual. I want to ensure that each new chapter start on an odd- numbered page. This is proving unbelievably difficult.

1 - if i use Odd-Page Section Breaks, any blank even pages that are inserted do not have the page numbers or headers or footers printed - they don't even show up when the document is print-previewed.   Is there any way to get page numbers, headers and footers to appear on these inserted blank pages ?

2 - I've tried inserting an IF field through VBA as follows:- { IF { =MOD({ PAGE },2) } = 0 "[page break]" " "} at the end of each chapter. But because each chapter is in a separate section, these fields only update one at a time each time I do an update fields orprint the document - so I have to do an update fields (or print) the same number of times as there are sections with one of these fields in, which is not possible in a big report with lots of sections and hence lots of these fields.   This is made worse if the user pastes separately-prepared Chapters into the main document.

This seems to me to be such a standard requirement - starting each new chapter on an odd-numbered (right-hand) page that there must be a simple way of doing it.   

Thanks
nikster

RE: odd page + fields (Word VBA)

Hi,

I'm no expert on VBA and there may be a simple command.
However I could see a couple of solutions.

Why not: (this is not the code just the flow)
 If page = odd then
  Insert Pagebreak
  Insert OddPagebreak
 Else
  Insert OddPageBreak
 Endif

That way if the page were odd it would insert 2 page breaks to get you onto an odd page again and only 1 page break if you were on an even page.

Knowing me and my need for a good macro, another route I would take would to have a hidden text marker at the begining of the chapter. Then write a macro (started with a button on the toolbar for speed) which then looks for these markers and inserts a blank page then an odd page break if the page were odd or just an odd page break if it were even.

You could even have text after the hidden marker which it uses to create a section break and change the header and footer to reflect the new chapter.

Just a thought

Regards

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources