Skip to main content
danielg98770948
Known Participant
April 23, 2019
Answered

Is there a way to tell if a paragraph is the first paragraph on a page?

  • April 23, 2019
  • 1 reply
  • 547 views

If I have a paragraph saved in a variable, such as myParagraph, is there a way to tell if it is the first paragraph on a page?

This topic has been closed for replies.
Correct answer Peter Kahrel

If you have one text frame on a page, then

if (myParagraph == myParagraph.parentTextFrames[0].paragraphs[0]) {

tests if myParagraph is the first one in the frame. If you have more text frames it gets a little bit more complicated.

P.

1 reply

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
April 24, 2019

If you have one text frame on a page, then

if (myParagraph == myParagraph.parentTextFrames[0].paragraphs[0]) {

tests if myParagraph is the first one in the frame. If you have more text frames it gets a little bit more complicated.

P.

danielg98770948
Known Participant
April 25, 2019

Thanks Peter!  This worked great!