[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2016-09-26
8
Medium Priority
?
70 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.
0
Comment
Question by:Lev Seltzer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 29

Expert Comment

by:Dr. Klahn
ID: 41815757
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
0
 

Author Comment

by:Lev Seltzer
ID: 41815769
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.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 41815770
You can use a Wildcard Find and Replace
Find: ^13(Chapter [0-9]{1,}^13)
Replace: ^p^m\1
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 76

Expert Comment

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

Author Comment

by:Lev Seltzer
ID: 41815787
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.
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 41816173
There are two main ways.

Firstly you can do it during the merge using fields - perhaps a bit like this:
{ IF { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶
" "" }{ SET Place1 { MERGEFIELD CITY }}¶
{ If { Place2 } <> { Place1 }"¶
{ MERGEFIELD CITY }¶

{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}¶

Open in new window

This field complex is from a Microsoft article here:
https://support.microsoft.com/en-us/kb/294686

Another method would be to run a VBA macro on the output document. To do this it would be necessary to extract the chapter number from the text. There are no mergefields in the merge result document. Therefore it would be necessary to find the data by the context, so it would help to see a sample output document.
0
 

Author Closing Comment

by:Lev Seltzer
ID: 41816421
Perfect. This took time to write, but it worked EXACTLY as I needed it to. Thank you for finding this for me.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 41816653
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.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question