title: How to automate extracting pages from a PDF using AppleScript and Acrobat Pro?
body: <p>I'm new to AppleScript, but I am trying to create a script that will go through all PDFs in a folder extracting the pages into separate files.  My plan is to use a combination of Automator and AppleScript.  </p>
  
  <p>My AppleScript so far is:</p>
  
  <pre><code>tell application "Adobe Acrobat Pro"
      open theFile
      set numPages to (count active doc each page)
      --execute the extraction here
  end tell
  </code></pre>
  
  <p>The command in Acrobat Pro is under <code>Options &gt; Extract Pages...</code>, where I can specify the page range and to extract to separate files.  However, I can't seem to find a way to do this with the Acrobat Pro Dictionary in AppleScript.  </p>
  
  <p>There is an <code>execute</code> command that executes a menu item, but I can't seem to get it working (I'm also not sure of the syntax to use; i.e. <code>execute "Options:Extract Pages..."</code>?).  Any help on this?</p>