JavaScript code to add merge (combine) another document after the last page
Hello there,
I have an Expense Report, (it's one page), I would love to add a JavaScript code to a button to attach (add) the receipts after the Expense Report
So once I click on a button I can browse the files I want and select one or all of them.
I used these codes, but unfortunately, did not work
var a = this.templates;
for (i = 0; i < a.length; i++)
a[i].spawn(this.numPages, false, false);
var a = this.getTemplate("PageA");
a.spawn({nPage:this.numPages-1,bRename:false,bOverlay:false});

I tried to follow the links in this page, but they are not working
Maybe I should to add a document level JavaScript codes? I hope it's an easy thing to do
Thanks in advance