1 Reply Latest reply on Jan 15, 2011 11:36 AM by Haakenlid

    Remove Frame


      Dear All,

      Below code is working fine with InDesign CS3 and CS4, but not working with CS5. I have a text frame with label "myRemoveFrame" and I want to delete.


      tell application "Adobe InDesign CS5"
          set myDoc to front document
          tell myDoc
              set myPageItems to page item "myRemoveFrame"
              repeat with aFrame in myPageItems
                  if class of aFrame is text frame then delete aFrame
              end repeat
          end tell
      end tell




        • 1. Re: Remove Frame
          Haakenlid Level 3

          Check this out:




          2) PageItems.itemByName(): With the new layers panel comes a name property for PageItems. In previous versions PageItems.itemByName() would return the page item with the specified label in CS5, it will return the page item with the specified name (which can be set in the Layers Panel). There is no longer a quick-and-easy way to get page items by their label using the 7.0 scripting DOM.


          So you can't use labels in that way anymore.