Do you specifically need to do this via a script? You can set the action for the bookamrk to open an attached file through the properties dialog for the bookmark. This tutorial by Ted Padova shows how to do that-
conceivably there could be a solution using javascript, but I can't find one in 'Acrobat SDK'. there appears to be no way to create a bookmark action that opens an attached file (analogous, say, to opening an attached file with a hyperlink created with the 'attach file as comment' tool). in the 'select action' dropdown (bookmark | properties | actions tab) there is no selection like 'open an attachment' and you can't open an attachment with 'open a file'. perhaps there is a clever, maybe javascript, tweak-around that I am missing.
Do you specifically need to do this via a script? You can set the action for the bookamrk to open an attached file through the properties dialog for the bookmark. This tutorial by Ted Padova shows how to do that-
http://www.acrobatusers.com/tutorials/2007/02/bookmarks_for_docs
Hope this helps,
Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
Dimitri Munkirs
WindJack Solutions
pdfscripting.com