We help IT Professionals succeed at work.

How do I force new pages for each chapter in a MS Word "directory" merge?

111 Views
Last Modified: 2016-09-26
I have 2000 questions that I am publishing into a book. The questions are from various chapters (1 to 330) and I would like each chapter to appear at the top of the page, such as "Chapter 100" when advancing to the next chapter. Can this be done in MS Word? How about MS Publisher, instead of Word? Or are there third party programs that can be purchased?

I know I can manually go through the final document and add in page breaks and chapter headings, but this will take too much time.

THank you.
Comment
Watch Question

Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
There must be something that separates one chapter from the next.  Suggest:  do a search-and-replace and apply the paragraph page break (Format option, in the version I have) as part of the change.

Adding page breaks using search-and-replace

Author

Commented:
I have 2000 questions. each question has a chapter number in one of the data fields. When the chapter number is different from the previous chapter number, that is when I want the heading to be displayed.
GrahamSkanRetired
CERTIFIED EXPERT
Top Expert 2012

Commented:
You can use a Wildcard Find and Replace
Find: ^13(Chapter [0-9]{1,}^13)
Replace: ^p^m\1
GrahamSkanRetired
CERTIFIED EXPERT
Top Expert 2012

Commented:
Sorry. I cross-posted and didn't see your new requirement. Can you post a sample document, please?

Author

Commented:
The datafile has 200 records. Let's say that the first 15 records have a "1" in the chapter field. Records 16 through 28 have a "2" in the chapter field. Records 29 through 40 have a "3", etc.

I want to start a new page after record 15 with a heading "Chapter 2" on it.
Retired
CERTIFIED EXPERT
Top Expert 2012
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Perfect. This took time to write, but it worked EXACTLY as I needed it to. Thank you for finding this for me.
GrahamSkanRetired
CERTIFIED EXPERT
Top Expert 2012

Commented:
Thanks
I congratulate you. I have modified that structure several times in the past to suit slightly different circumstances and each time it took ages.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions