I am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me

Dear ALL,
i am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me solutions.
var myBookFileName ,myBookFileName_temp;
                if ( myFolder != null )
                        var myFiles = [];
                        var myAllFilesList = myFolder.getFiles("*.indd");    
                        for (var f = 0; f < myAllFilesList.length; f++)
                                    var myFile = myAllFilesList[f]; 
                                    myFiles.push(myFile);
                        if ( myFiles.length > 0 )
                                    myBookFileName = myFolder + "/"+ myFolder.name + ".indb";
                                    myBookFileName_temp=myFolder.name ;
                                    myBookFile = new File( myBookFileName );
                                    myBook = app.books.add( myBookFile );  
                                   myBook.automaticPagination = false;
                                    for ( i=0; i < myFiles.length; i++ )
                                               myBook.bookContents.add( myFiles[i] );             
                                    var pdfFile =File(File(myFolder).fsName + "\\"+myBookFileName_temp+"_WEB.pdf");
                                    var bookComps = myBook.bookContents;
                                    if (bookComps.length === 1)
                                                   bookComps = [bookComps];
                                     var myPDFExportPreset = app.pdfExportPresets.item("AER6");
                                    app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFEx portPreset,bookComps);
                                  //myBook.exportFile (ExportFormat.pdfType, pdfFile, false);
                                  //myBook.exportFile(pdfFile, false, pdfPref, bookComps);
                                    myBook.close(SaveOptions.yes);      

Change the below line:
app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset,bookComps);
to
app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset);
Vandy

Similar Messages

Maybe you are looking for

  • Using AutoCAD on a Mac Pro

    I was a devoted mac user all through college. (I even had one of those old macs with the 9in mono screens - LOL), but had to switch in the late 1980's because as an engineer using CAD software I was forced to go PC. I have been a pc user ever sinse b

  • Error while deploying WDA application on portal.

    hello Friends, i am getting this error when eevr i try to check my WDA application on portal. can you please help me? note:my its connection is not establishing. is this the cause of error? The URL http://duetserver:8006/sap/bc/webdynpro/sap/z57316_p

  • What's the difference between 2nd and 3rd generation

    PLEASE HELP! New Apple user and looking to purchase a used 2nd or 3rd generation ipod touch. what's the difference between 2nd and 3rd generation? apparently I am told that the 2nd gen does not have the capabilities of listening without headphone? an

  • Performa 600 monitor

    A friend has a Performa 600, OS8, and wants to get old files off it to convert to pc format. His original monitor died and he wants to know what kind of monitor he can connect and if an adapter is needed in order to connect a current monitor. I recal

  • Customer number got blocked in previous dunning

    Hi Friends, This is with regard to customer number got blocked in previous dunning which the printout has already generated and the job got deleted by the user. When I tried to execute the same customer number in new dunning, it is showing the messag