2 Replies Latest reply on Jun 10, 2010 6:29 AM by Kasyan Servetsky

    [IDCS4][Delete Table]


      Hi All,
      In my indesign document there are some table but there are some table in pasteboard areas too. I want to delete those tables which is lying in top pasteboard area with parent frame of the table.



        • 1. Re: [IDCS4][Delete Table]
          [Jongware] Most Valuable Participant

          1. Loop over all tables in your document. For each table,

          2. Select its parent -- it should always be a text frame. Then,

          3. Check its parent. This may be any of a large number of possibilities -- another text frame, a character, a page, a spread or master spread, and some more. But only if the parent is Spread, the item is on the pasteboard.

          4. If so, delete the frame.


          I'm not sure what the parent is when the text frame is partially on the pasteboard. I would guess that if it touches a page, that page becomes its parent.

          (Okay -- just tested that, and I guessed right.)

          • 2. Re: [IDCS4][Delete Table]
            Kasyan Servetsky Level 5

            Here is a simple script for deleting all objects on pasteboard, written, if I am not mistaken, by Harbs. Use it as it is or modify it to your needs.




            var objs = app.documents[0].pageItems.everyItem().getElements();
                 if(obj.parent instanceof Spread){obj.remove()}