2

There's a particular paragraph in my document and I want to replace its content completely with something else programatically. Is there any function to do this? I need something like this:

app.activeDocument.stories[7].paragraphs[0]. = "blah blah blah";

where <function> is the function that would allow you to replace the content of the paragraph in question to "blah blah blah." I bet this is possible but am not aware of the functions available.

2

it should be like this:

app.activeDocument.stories[7].paragraphs[0].contents = "blah blah blah\r";

See http://yearbookmachine.github.io/esdocs/#/InDesign/Paragraph/contents.

The \r creates a had linebreak. For a soft linebreak use \n

Your Answer

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

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