Celeb Glow
news | March 03, 2026

How to keep lines together in Word

I have these lines in my (technical) document:

public IQueryable<NatuurlijkPersoon> Get()
public Person Get(Guid id)
public void Add(Person source, MyEntities context)
public bool SetContext(MyEntities context)

Each line is separated by a single Enter.

These have to stay together at all times, line breaking in any way would make the context very hard to understand. So, I've tried the following:

  1. Select lines
  2. Right click
  3. Paragraph
  4. Line and Page Breaks tab
  5. Keep lines together

It's basically the same as the third option provided on this page.

But no effect, they are spread across two pages as before. Any suggestions?

1 Answer

"keep lines together" is applied only within paragraphs.

In your case you need to use keep with next. (take care not to select last line for this action, otherwise this whole part also will be kept together with anything after it)

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy