I'm trying to update a report by replacing each page with the updated monthly page. My preference is to replace rather than insert, that way I can keep the bookmark destinations in the table of content. When I insert pages, the bookmarks in the individual PDF files are lost (they don't come in).
I used the following script, but it's not working. The script runs, but when I look at the file, the pages aren't replaced. Can someone tell me what I'm doing wrong? I don't know much about coding; I took bits and pieces from the Adobe's guide, reference, and the forum.
Here is a snippet of my code:
============================
app.openDoc({
cPath:"/k/coco/pdf mktg internal reports/working folder/copy of AJO_Internal_Reports.pdf"
});
this.replacePages({
nPage: 37,
cPath:"/k/coco/pdf mktg internal reports/working folder/copy of 21_Portfolios Gained.pdf",
nStart: 1,
nEnd: 3
});
this.replacePages({
nPage: 40,
cPath:"/k/coco/pdf mktg internal reports/working folder/copy of 22_Portfolios Lost.pdf",
nStart: 1,
nEnd: 2
});
currentDoc.closeDoc(false);
//note: the above code is used for all the other pages
===========================
Thanks in advance.
George Kaiser