0

I have more than 4000 messages, and I want to create a book for these messages in chat style Look at this screenshot, it's just an example enter image description here

Now, everything is ok, but I want to append an avatar image to each person in the conversation (Person A & B) automatically, because the avatars in the screenshot are created manually (takes a lot of time), so I want an automatic method, through a script, find & replace, GREP ...etc or anything that can do that.

Is this possible? Thank you

1 Answer 1

2

You can easily add the same anchored object multiple places using Find/Change.

  • Make sure the avatar image has an Object Style so you can later change its settings.

  • Copy the object containing the avatar image to clipboard.

  • Enter Find/Change and switch to the GREP tab. In Find what, enter ^ (Beginning of Paragraph). In Change to, enter ~c (Clipboard Contents, Formatted). In Find Format, choose the Paragraph Style where you want to insert the avatar currently in clipboard.

  • Hit Change All.

When inserting avatars in the right side, you might want the anchored object to be in the end of the paragraph insteads of the beginning (although it's not really necessary as the position of the avatar is set within its Anchored Object Options). In that case you can search for $ (End of Paragraph) instead.

7
  • Wow Wow Wow, Thank you for this great explanation, I followed your instruction but my problems are: the Change All is disabled and you must change one by one through Find Next and Change. Secondly, when changing avatar, it enters inside paragraph, but not beside paragraph as in your gif preview See screenshot: ibb.co/YXNj95k, please can you solve these problems, because I am new to InDesign. Additionally, please attach your demo file to increase my knowledge in InDesign. Lastly, I attached my demo file to explore my problem: mediafire.com/file/gwtd1s20za6ntn3/demo.indd/file Commented Oct 16, 2021 at 14:25
  • This goes a bit further than the original question and hard to explain here in comments. Here are some tips: Read about anchored objects here. If all avatars have the same object style you can just change one and redefine the object style to apply to all. You need separate paragraph styles for left and right aligned text. You also needs separate object styles for avatars going to the left and right side. Each line that needs an avatar must be a separate paragraph (with a Paragraph return not a Forced Line Break).
    – Wolff
    Commented Oct 16, 2021 at 15:10
  • Why Change All doesn't work, I can't say. Do you have the exact same setup in Find/Change?
    – Wolff
    Commented Oct 16, 2021 at 15:10
  • Thank you for your continuous help. I'm sorry, Change All is not disabled, but each time when clicking on it, a message appears (Search is completed, 0 replacement made), while when using Find Next, a result appears and then make Change. Also, when making Change, the changing eats the first letter of each paragraph, so in this case, you must have a space before each paragraph. I made a video to summarize my problems at this link: youtu.be/pDn0cjxT3xc . Please Please Please I really need this feature to work with me, so you should help me as you can. I appreciate your help and time. Commented Oct 16, 2021 at 19:01
  • It seems like you do exactly as I do. I must be overlooking something. What if you search for >. (Beginning of Paragraph followed by Any Character) and replace with ~c$0 (Clipboard Contents, Formatted followed by Found Text)?
    – Wolff
    Commented Oct 16, 2021 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.