I have a macro that uses Acrobat v6 to print a worksheet. I have set the defaults on Acrobat to automatically over write any existing pdf file in the target directory. The created adobe file name defaults to the workbook name. For example, lets say the created adobe file is in C:my documentsmyfile.pdf.
What I would like to do within Excel VBA is rename this file, say to c:my documentsnewmyfile.pdf. I do not need the file name to be dynamic—the filename needs to be the same name month after month as this file is used on the company’s intranet site. Then I need to copy it to a network directory. This file will already exist in the network directory [i.e., data from the previous month] so I will need the ability to over write the existing file or if this is not possible, then delete the previous month file and then copy the newmyfile.pdf file to the network directory. Finally, I would like to delete the c:mydocumentsnewmyfile.pdf.
Can this type of activity be controlled within an excel vba code? I am very new at VBA, so any example code is greatly appreciated. THANKS.