petermeachem
Programmer
I have some code that print to a pdf using pdf955 and then adds the pdf to our document imaging system. It looks like this, lots of detail missing but this shows the flow.
The palaver with deleteme.del and deleteme.bat is supposed to make the process wait until the pdf has been generated.
The problem is that the word code is whistling straight through right to the end and then creating the pdf.
Does anyone know how I could persuade the print to pdf section to print where I have told it to and not at the end.
I haven't explained this terribly well, I hope it makes some sense to someone.
Code:
'set up pdf995 ini
When pdf995 is finished, it runs deleteme.bat which deletes deleteme.del
On Local Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("c:\overdrive\deleteme.del")
On Local Error GoTo 0
ActiveDocument.SaveAs cDocumentName
STDprinter = Application.ActivePrinter
Application.ActivePrinter = "pdf995"
ActiveDocument.PrintOut
Application.ActivePrinter = STDprinter
cDocumentName = cPath & Jcounter & ".pdf"
loop to check when c:\overdrive\deleteme.del is deleted
Run document imaging input
'reset pdf995 ini
The palaver with deleteme.del and deleteme.bat is supposed to make the process wait until the pdf has been generated.
The problem is that the word code is whistling straight through right to the end and then creating the pdf.
Does anyone know how I could persuade the print to pdf section to print where I have told it to and not at the end.
I haven't explained this terribly well, I hope it makes some sense to someone.