Skip to main content
Participant
December 19, 2016
Answered

I am looking for JavaScript that executes Tools-Pages-Insert from File

  • December 19, 2016
  • 2 replies
  • 1073 views

I am looking for JavaScript that executes Tools-Pages-Insert from File in Adobe Acrobat.  I have a coversheet.  I would like to add a button to it that allows the user to insert other pages from another PDF.  I have found the JavaScript that adds another PDF as an attachment, but that doesn't accomplish my goal.  I am using Acrobat Pro XI.  Any help would be greatly appreciated.

This topic has been closed for replies.
Correct answer try67

I just want them to get the Browsing screen that shows up after you press "Insert from File" to browse to a PDF to insert.  I guess it would be good if the default was insert after the coversheet.


You can achieve it with this code:

app.execMenuItem("InsertPages");

2 replies

Joel Geraci
Community Expert
Community Expert
December 19, 2016

See Doc.insertPages()

Doc methods

try67
Community Expert
Community Expert
December 19, 2016

Do your users also have Acrobat? Because this command can't be used if they

have Reader...

On Mon, Dec 19, 2016 at 5:35 PM, heather-1000 <forums_noreply@adobe.com>

Participant
December 19, 2016

Yes.  All users will have the same version of Acrobat that I have.

try67
Community Expert
Community Expert
December 19, 2016

OK. And you want them to be able to select which file to insert and where, or should it be a part of the code?