Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to automatically add paragraph return or line break after every first word?

Contributor ,
Oct 29, 2018 Oct 29, 2018

Hi all,

I thought this was SO EASY to do and that I already knew how to do it... but all of a sudden I am battling to do it, maybe because I am trying to do it in a hurry...

I have been working on data merge today (finally got my problems with THAT sorted out yahoo!!) and need one of the fields/styles to be set on two lines instead of one, with the person's first name on the first line and their surname on the second line....so it looks like this:

Frank

Sullivan

instead of one line.

I have been fiddling with nested styles but am battling to find an easy way to do this.  Before today I thought I was a PRO with nested files and thought this would be SO easy but.... Instead of doing this manually (there are just soooooooooooo many names to do   ) I would love for it to happen automatically as part of the style.

Help???

2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Oct 29, 2018 Oct 29, 2018

Short version:

Grep code: (?s)^\H+\K\h

Char style: +tracking = 10000, +horizontal scaling = 1000

Translate
Community Expert ,
Oct 29, 2018 Oct 29, 2018

Are FirstName and LastName two fields (as they should be) or one? Are there any middle names or initials?

If they are in two fields, press Return after the first name field and put last name on the second line. Run data merge again.

If they are in one field, you can split it in Excel. Tell me if you need to know that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 29, 2018 Oct 29, 2018

Jane,

They are in one field in Excel This is how the spreadsheets were given to me.

Can you let me know how to split it in Excel then?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018
  1. Save first, so you can close without saving if needed
  2. Make sure there is an empty column to the right
  3. Select this column


  4. Data tab > Data Tools > Text to Columns > Delimited > Next
  5. The delimiter is the space
  6. Confirm the preview and click Next


  7. Keep General (or change the format) and click Next
  8. Change the headings to say FirstName and LastName. You are done in Excel. Later you can concatenate to bring them back together if needed. Use these field instead.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 29, 2018 Oct 29, 2018

Short version:

Grep code: (?s)^\H+\K\h

Char style: +tracking = 10000, +horizontal scaling = 1000

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 29, 2018 Oct 29, 2018

Michel,

Thank you SO MUCH... I am pretty sure this is the exact answer I needed...but I confess that I need to play around with Grep styles a little more I am going to do some experimenting right now after this post...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 29, 2018 Oct 29, 2018
LATEST

And Michel...thank you...that worked WONDERFULLY too!!!! Altho' at this point in time I have NO idea how exactly that worked...but it worked PERFECTLY!!! I really need to study GREP a LOT more so that I can understand a lot more about how to use it... I know I am missing out on SO MUCH MORE that I can do with InDesign

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 29, 2018 Oct 29, 2018

Jane-e, thank you SO MUCH for the time you took for your very detailed and helpful answer... it worked wonderfully and was SO SO easy to do!!!

I am SO HAPPY I posted this question here today.... I learned TWO ways to solve this .... THANK YOU again

How I LOVE this forum!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

Hi Christine,

They both work and Michel and I are friends, even though we have never met and live thousands of miles apart. So use whichever works best!

~ Jane

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 29, 2018 Oct 29, 2018

Thank you Jane-e But I just WISH there was a way to mark TWO answers as being correct here....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

Go ahead and mark Michel's answer correct, Christine, and thanks for asking!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 29, 2018 Oct 29, 2018

Hi,

Just include a grep style in the para style! …

Best,

Michel, for FRIdNGE

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

So two choices, Michel!

I prefer a clean Excel document, and Text to Columns takes less than two minutes. Good database design includes that each piece of data goes into its own field. First and Last names should never get stored in the same field.

But wait, Michel, not a script?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines