3 Replies Latest reply on Oct 6, 2008 3:39 PM by sstanleyau

    Anyone ever encounter this error? Connection is invalid.

      Adobe InDesign CS2 got an error: Connection is invalid.

      I am running the following AppleScript to delete all pages that use a specific master page. It works, unless I create a document from a template, then it explodes and gives me the error. Any help would be appreciated.

      set _pages to {}
      tell application "Adobe InDesign CS2"
      tell document 1
      set _master to master spread "B-Bob" -- Master page name
      set _pages to every page whose applied master is _master
      set pageCount to count items in _pages
      repeat with i from 1 to pageCount
      -- set variable to page
      set _pageVar to (item i of _pages)
      -- set variable to page id
      set _pageID to id of _pageVar
      delete (pages whose id is _pageID)
      end repeat
      end tell
      end tell