4 Replies Latest reply on Oct 28, 2008 9:15 AM by Martin Fischer

    Add a paragraph and get a reference to it

    frameexpert Level 4
      Hello All,

      I am using the following to add a new paragraph after the one containing the insertion point:

      // Get a reference to the selected paragraph.
      var oPgf = app.selection[0].paragraphs[0];
      // Add a blank paragraph.
      oPgf.insertionPoints[-1].contents = '\r';

      I want to get a reference to the new paragraph without having to query the document's selection. So given a paragraph object oPgf, what is the best way to add a paragraph after it and return a reference to the new paragraph? Thank you very much.

      Rick Quatro
      rick at frameexpert dot com