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

  • [JS CS5] Re order pages script not working for me

    Hi, I'm attempting to use the reorder script marked as the answer in this post : http://forums.adobe.com/thread/519470 My problem is that when it reorders the pages, it puts them all into one spread and errors once it reaches 10. Some details on what

  • Object not showing up when published

    Hi, I have finally managed to get a Facebook "Like" button onto my website but the problem I have now is that the text for the button merges into my background fill which is grey. I have tried creating a bar of colour to fit behind the HTML snippet a

  • Message says my slideshow music selection can't be found or opened?

    I created a Slideshow complete with music from my iTunes library and played it a number of times yesterday. Last night when I tried to run the slideshow for an event, I kept getting the message my music selection can't be found or can't be opened. Th

  • Questions re: Bridge CS3

    I am new into using Bridge even though I have it for a while. I am trying to solve these problems: 1. How come some files do not have thumb nail previews, but when I play them in the monitor windows, they play fine. Just no thumb nail preview? 2. Is

  • Unable to handle fault thrwon by BPEL in ESB

    hi , my bpel process(syncronous request&reply) is throwing the remote fault and my ESB process is not picking the fault even both fault schema are same. error message: <MSG_TEXT>An error occurred for port: BPEL_OC4J_SOAP_Provider: javax.xml.rpc.soap.