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

  • Unable to transfer large files from MB to External HDs

    Hi, This may be an unusual one. My 1st edition Macbook won't let me transfer large files to my external hard-drives, either by USB, Ethernet or wirelessly through my home wi-fi network. I've started video editing so I'm importing DVcam tapes through

  • Error while running payroll

    Dear All, While running the payroll,error  like Assignment to feature 40EPF did not take place appears. Current month (i.e. June 2011 PF is not deducting).whereas the PF arrears is deducted for April'11 and May'11. In error screenshot it is showing a

  • Why do iPhoto slideshows have such low resolution?

    I have used iPhoto to make slideshows. When you preview the slideshow the resolution is great, but when you actually create the slideshow the images are really low res. Why? iDvd does the same thing, what is up? Does version 6 have better res on slid

  • Coulnd not resolve mx:script "or" mx:operation to a component implementation

    i'm execising flex builder 2's help lessons step by step. i'm coding what the guide tell but i've problem when i use <mx:script> tag or <mx:operation> tag. i couldn't find why it is like that and so i couldn't solve the problem. i'm giving you the 2

  • Oracle installation on SAN

    I have Oracle 10.2 database installed on Windows 2003 server with system, application and data partitions. It is also SAN drive attached to this server, with lot of free space. I would like to build standby database for testing purposes. Is it possib