Vba to merge all pdf files in a folder via pdf-creator

  • HELLO ALL..!!:heelloo:
    GREETINGS OF THE DAY.


    I HAVE A FOLDER WHERE THE FOLLOWING FILES AND SUB-FOLDER ARE PRESENT
    1) A FOLDER NAMED "raw folder" IN WHICH I HAVE AROUND 11 PDF FILES.
    2) AN EXCEL FILE WITH THE VBA CODES TO MERE PDF FILES LOCATED IN ABOVE MENTIONED FOLDER ("raw folder")


    THE CODES GIVEN BELOW CREATES A NEW PDF FILE NAMED "outputFile.pdf" WITHIN THE PARENT FOLDER.
    FOR THIS
    1) I HAVE INSTALLED PDF-CREATOR (Downloaded from http://sourceforge.net/projects/pdfcreator/)
    2) I HAVE CHECKED "PDFCreator_COM" IN TOOL > REFERENCES


    THE CODES ARE WORKING CORRECTLY FOR THE FIRST TIME WITH ALL 11 PDF MERGED TO ONE PDF
    BUT WHEN I RUN THE CODES FOR SECOND TIME IT DOESN'T MERGE ALL THE 11 FILE BUT ONLY THE 1ST PDF FILE IS RETURNED AS OUTPUTFILE
    WHEN I RUN THE CODES FOR THE THIRD TIME , THE CODES ARE WORKING CORRECTLY .
    AND SO ON


    PLEASE HELP ME OUT TO FIGURE IT OUT



    HERE IS THE VBA CODE



    Thank in advance. :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!