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

  • Watching movies on computer and Apple TV

    If I rent a movie on my MacBook Pro and start streaming it, can I move to to the living room and continue watching the movie on Apple TV.

  • NOKIA 6610i GOTO function is not working

    Hi, I have a 66101 and its having problem of getting reset when go to is pressed (upper Right key) or when selected thru menu. Pls help to resolve this issue.

  • Error while using BAPI_REQUISITION_CHANGE

    Hello All, I am using the bapi BAPI_REQUISITION_CHANGE, to change the quantity for the PR number. Currently I am passing the following details:- PR number in importing parameters PR line item, Storage Location, Material Group, Quantity, and UOM both

  • I'm having problems syncing my outlook calender with iphone 3gs calendar

    Just recently, with the last week, the updates and additional appointments that are made in my outlook calendar are not syncronizing to my Iphone.  I am having the same problem if I add an appointment in my iphone calendar it is not syncing with my o

  • Setting a Default PDF Preset

    I have made a custom PDF Preset for my students to use.  It is loaded in all the programs fine, but I can't figure out how to make it the Default when saving/exporting from the various programs (inDesign, Illustrator, Photoshop, AutoCAD, etc). I don'


HashFlare