Skip to main content
Participant
Dec 19, 2016 4:29 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Dec 19, 2016 10:32 PM UTC

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");

7 replies

Joel Geraci
Community Expert
Community Expert
Dec 19, 2016 4:37 PM UTC

See Doc.insertPages()

Doc methods

Translate
try67
Community Expert
Community Expert
Dec 19, 2016 4:37 PM UTC

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>

Translate
Participant
Dec 19, 2016 5:51 PM UTC

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

Translate
try67
Community Expert
Community Expert
Dec 19, 2016 8:11 PM UTC

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?

Translate