Tuesday, November 22, 2011

Things that Reside in Text Frames

The previous post discussed the fact that graphic objects have a FrameParent property that returns their containing frame. Objects that can appear in text have a similar property that returns their containing text frame. These objects are markers, cross references, variables, anchored frames, and text insets of various types
    While cross references, variables, and text insets contribute to the document content, markers do not. Anchored frames do not contribute to paragraph content although they can add considerable document content. For that reason, markers and anchored frames exist at a location in text while the other three have an associated text range that delineates the start and end of their content. Thus there are the following object/property pairings:
    • Markers and anchored frames have the TextLoc property that returns an offset from the start of the containing table cell or paragraph.
    • Cross references, variables, and the various text inset objects (Ti*) have the TextRange property that provides a starting and and ending text location.
    Once you know a text location or range, you can easily get the identifier of the paragraph or table cell that starts (or ends) the text location. Those objects have the InTextFrame property that takes you to the (graphic object) text frame.

    NOTE: Anchored frames have the InTextFrame property as well as the TextLoc property allowing you to go directly learn the idenfier of their text frame when desired.

    No comments:

    Post a Comment