Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Keeping text together …

Return to Member Forum

  • Author
    Posts
    • #61403
      gamouning
      Member

      Hi,

      I am creating a mailing directory and need to keep all related address information together. Some times address information is missing so there isn't any consistent way to know how many lines each person will contain. Often times, this means a page break will occur in different places in the text. Currently, I have to manual insert page breaks and this is what I would like to avoid.

      If it helps, below I have prepared a sample of how my data appears:

      Name: Fullname

      Home: Address1

      Address2

      City, State Zip

      Home Phone number

      Business: Address1

      Address2

      City, State Zip

      Business Phone number

      Email: email address

      Name: Fullname

      Home: Address1

      City, State Zip

      Home Phone number

      Email: email address

      Thanks in advance for your help.

      -Greg

    • #61404

      Use the Keep options. Set “Keep with Next” to 1 for all lines per set except the last one; set it to 0 for that one.

    • #61409
      gamouning
      Member

      Thanks for the reply Jongware. This is quite close to what I desire. The text is staying together and floating across page boundaries without inserting manual page breaks. The only problem I notice is that the style for my last line could be differet depending upon how much address information is included. For example, the last line could be an e-mail address, phone number or address line.

      Since I know the first line will always be the name is there some way to use the “Keep with Next” feature so that it based off of the first line? Hope that makes sense. :)

    • #61412

      If you have CS5.5 you can use its new feature “Keep with Previous” — simply reverse all of my instructions above …

      For CS5 or earlier I don't have any (non-scripted) solution.

    • #61413
      gamouning
      Member

      Ok, I will try to find a copy of CS5.5. In the meantime, do you have a GREP or script you are willing to share?

    • #61415

      GREP is of no use here, and it'd need a custom script — I haven't had this particular need in the past, so that's a no.

    • #61416

      Hah — I had an idea and it worked!

      1. Set all of your text to Keep With Next:1 line. InDesign won't change a thing, because it somehow detects it's nonsense to keep such a long list all together.

      2. Run this Javascript:

      app.findGrepPreferences = null;
      app.findGrepPreferences.findWhat = “r(?=Name)”;
      foundList = app.activeDocument.findGrep (true);
      for (i=0; i<foundList.length; i++)
      foundList[i].keepWithNext = 0;

      3. And suddenly you have all of your “Name” items at the top of a column!

      (Edited 3 times, this one ought to be okay now)

Viewing 6 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads