G
gitcypher
I just finished writing the macros to print pdfs from my workbook. Th
last "line" of code is to use acrobat distiller to create the pdfs
During the macro, each sheet prints itself to a post script file, then
they are all compiled together (using distiller) to create on
invoicing package pdf. After that has completed, I would like to delet
the post script files, as well as the log file that is created whe
distiller runs.
I'm able to delete the files fine using
Kill (Range("NameFolder").Value & "\PDFs\*.ps")
Kill (Range("NameFolder").Value & "\PDFs\*.log")
Unfortunately, the computer is moving faster then distiller, in tha
the code is unable to delete the files because they are still in use.
I've added...
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now())
7)
before the kill commands, but that varies with each computer, eve
mine! Yesterday, it took about 6 seconds to distill all 8 or so sheets
Today, I booted up fresh, and the 7 seconds didn't allow enough time.
Is there something conceptually similar to...
ReturnValue = 999
DistillerCall = Range("AcroFName").Value & " /n /q /o" & PDFFileName
" " & PSFileName
Do
ReturnValue = Shell(DistillerCall, vbNormalFocus)
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now())
.5)
Loop Until ReturnValue <> 999
-Gitcyphe
last "line" of code is to use acrobat distiller to create the pdfs
During the macro, each sheet prints itself to a post script file, then
they are all compiled together (using distiller) to create on
invoicing package pdf. After that has completed, I would like to delet
the post script files, as well as the log file that is created whe
distiller runs.
I'm able to delete the files fine using
Kill (Range("NameFolder").Value & "\PDFs\*.ps")
Kill (Range("NameFolder").Value & "\PDFs\*.log")
Unfortunately, the computer is moving faster then distiller, in tha
the code is unable to delete the files because they are still in use.
I've added...
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now())
7)
before the kill commands, but that varies with each computer, eve
mine! Yesterday, it took about 6 seconds to distill all 8 or so sheets
Today, I booted up fresh, and the 7 seconds didn't allow enough time.
Is there something conceptually similar to...
ReturnValue = 999
DistillerCall = Range("AcroFName").Value & " /n /q /o" & PDFFileName
" " & PSFileName
Do
ReturnValue = Shell(DistillerCall, vbNormalFocus)
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now())
.5)
Loop Until ReturnValue <> 999
-Gitcyphe