Hello everyone, I wrote a vba app to iterate through the drawing layouts and print them into sets. The number of sets the user enters into a text box. The problem is that the drawings are not coming our in the order I sent them (ie, the smaller files that transfer the quickest are the first ones to print). I am using the following dos shell command: For y = 1 To copysets For x = 0 To UBound(arrFinal) Shell "c:\kipBatch.bat " & """" & arrFinal(x) & """" Next x Next y Is there any way to prevent the out-of-order printing? Perhaps a queue to I can make in vba??
into sets. The number of sets the user enters into a text box. The problem is that the drawings are not coming our in the order I sent them (ie, the smaller files that transfer the quickest are the first ones to print). I am using the following dos shell command: I can make in vba?? Could it be a print server issue? I've never had such a thing happen here, sending PLT files from a web server shell.
It's a kludge, and you'll have to try it to even see if it would solve your problem, but you could put a few seconds' pause after each shell command time to give it time to get in the queue .... Code: [QUOTE] Shell "c:\kipBatch.bat " & """" & arrFinal(x) & """"[/QUOTE] Call PauseProg(5) Public Sub PauseProg(pauseTime As Double) 'pauseTime is in seconds Dim i As Long, start As Double If Timer + pauseTime < (24 * 60 * 60) Then start = Timer Do Loop Until Timer > start + pauseTime Else 'loop would have run for 24 hours before exiting... 'could enhance to loop until either: ' A) (time > endTime), or ' B) (date >= endDate) and (time > endTime) End If End Sub into sets. The number of sets the user enters into a text box. The problem is that the drawings are not coming our in the order I sent them (ie, the smaller files that transfer the quickest are the first ones to print). I am using the following dos shell command: I can make in vba??