Skip navigation
Currently Being Moderated

Get reference to textframe that the selected text is in.

Jun 14, 2012 10:37 PM

How do I get a reference to the textframe that the selected text is in?.

 
Replies
  • Currently Being Moderated
    Jun 14, 2012 11:38 PM   in reply to woudger7777

    text.parentTextFrames returns an array of all the textframes the specified text runs through.

     

    so you'd want:

    text.parentTextFrames[0];

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2012 11:44 PM   in reply to woudger7777

    Edit:

    Ups, a bit to late, sorry for that ...

     

     

    HI,

     

    first, selection is a array. So you have to loop through the items to get each parent text frame.

     

    if selection[someitem] is word or paragraph you can use parentTextFrames, which is an array again

    if selection[someitem] is a table it's parent ...

    if selection[someitem] is a anchored object it should be parent.parentTextFrames[0]

     

    Guess I'm missing a lot possibilities ;-)

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points