3 Replies Latest reply on Dec 18, 2008 2:24 PM by sstanleyau

    [IDCS4][AS] Cut or Copy Table, paste into new rectangle

    Level 1
      First off I can't believe I'm having issues doing this because it seems like it should be very simple. I need to take a selected table, get the geometric bounds, make a new rectangle with those bounds, then cut the table and paste it into the rectangle.

      Getting the bounds and making the rectangle is easy enough, but I can't cut or copy the selected item. Thoughts??

      tell application "Adobe InDesign CS4"
      set thefile to active document
      tell thefile
      set mySelection to selection
      set myObject to item 1 of mySelection
      set myclass to class of myObject
      set myPath to geometric bounds of myObject
      cut myObject
      set myrectangle to make rectangle with properties {geometric bounds:myPath, stroke color:"Black", fill color:"None"}
      paste into myrectangle
      end tell
      end tell