2 Replies Latest reply on Mar 9, 2015 8:26 AM by Mirko Janetzke

    Textframe: insert object to into text

    Mirko Janetzke

      Hi all,

       

      I want to insert a object, such as a polygon or a group of polygons, into the text of a textframe. How can I do that?

       

      I am able to insert a graphic (e.g. indd) via the box.insertionPoints[x].place(graphic), but this is not what I need to achieve, because I do not want to use external file to be linked.


      Thanks a lot for helping!

      Mirko

        • 1. Re: Textframe: insert object to into text
          Laubender Adobe Community Professional & MVP

          @Mirko – for InDesign CS5.5 and above:

           

          myGroupOfPolygons.anchoredObjectsSettings.insertAnchoredObject(myInsertionPoint, myAnchorPosition/*optional*/);
          

           

          Wheras:

           

          myGroupOfPolygons is a Group object somewhere in the same document as the insertion point you want it to anchor to.

           

          myInsertionPoint is a valid insertion point in the text frame you want to anchor the group.

           

          myAnchorPosition is defined as one of three possible values:

           

          AnchorPosition.ABOVE_LINE

          AnchorPosition.INLINE_POSITION

          AnchorPosition.ANCHORED

           

          AnchorPosition.ANCHORED is default, if the second argument of method insertAnchoredObject() is not used.

           

          The exact position of the anchored object can be defined with some more properties of the anchoredObjectsSettings after using insertAnchoredObject().

           

          Uwe

          • 2. Re: Textframe: insert object to into text
            Mirko Janetzke Level 1

            Thanks a lot for your help, Uwe!