I've got some vba that loops through a recordset, prints a report to pdf then prints the pdf file. This is a scenerio I've used several times with success. The problem is that not all of the pdf files are being printed. I have similar code on another pc that prints to the same network printer and is working correctly.
x = ShellExecute(0, "print", strPDFFileName, vbNullString, vbNullString, 1)
I've tried adding doevents and waits to various places to no avail. There doesn't seem to be any pattern to the which files make to the printer and which do not. I added a debug.print after the shellexecute and it returns 42 (errors are <=32) indicating that shellexecute processed successfully.