C
Charlie Rowe
eI am printing hundreds of envlopes on my LaserJet using Mailmerge linked to
an Excel spreadsheet. In order to keep my LaserJet from overheating, I have
put in a long For Next loop to get a 20 second pause after each envelope.
(Is there something equivalent to Excel's Application.Wait?)
Sub PrintSlowly()
Dim t As Integer, l As Long
For t = 1 To 100
ActivePrinter = "BASEMENT HP 1300"
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.SuppressBlankLines = True
With .DataSource
.FirstRecord = t
.LastRecord = t
End With
.Execute Pause:=False
End With
For l = 1 To 600000000
Next l
Next t
End Sub
The inconsistency I don't understand is this:
Running this macro with only Word active (and thus active) is slower than if
I open Windows Task Manager and make Task Manager active.
With Task Manager active, I get a very consistent 10-second pause. With
Word active, I get a roughly 20-second pause that is not consistent (13
seconds to 25 seconds). This behavior is the same with programs other than
Task Manager open and active. Excel is not open.
I'm just curious if anyone can explain this behavior. It may have something
to do with "Now Printing Body" vs "Now Printing Page 1." When Word is
active, I see the Printer Dialog Box for many seconds with the "Now Printing
Body" as its first line, and the Task Manager shows low processor usage.
Then the first line of the Printer Dialog Box changes to "Now Printing Page
1" and the processor usage goes up to 100% or so. When Task Manager is
active, I usually do not see the "Now Printing Body" line, and the processor
usage stays pegged at 100%.
Thanks for any insight,
Charlie Rowe
an Excel spreadsheet. In order to keep my LaserJet from overheating, I have
put in a long For Next loop to get a 20 second pause after each envelope.
(Is there something equivalent to Excel's Application.Wait?)
Sub PrintSlowly()
Dim t As Integer, l As Long
For t = 1 To 100
ActivePrinter = "BASEMENT HP 1300"
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.SuppressBlankLines = True
With .DataSource
.FirstRecord = t
.LastRecord = t
End With
.Execute Pause:=False
End With
For l = 1 To 600000000
Next l
Next t
End Sub
The inconsistency I don't understand is this:
Running this macro with only Word active (and thus active) is slower than if
I open Windows Task Manager and make Task Manager active.
With Task Manager active, I get a very consistent 10-second pause. With
Word active, I get a roughly 20-second pause that is not consistent (13
seconds to 25 seconds). This behavior is the same with programs other than
Task Manager open and active. Excel is not open.
I'm just curious if anyone can explain this behavior. It may have something
to do with "Now Printing Body" vs "Now Printing Page 1." When Word is
active, I see the Printer Dialog Box for many seconds with the "Now Printing
Body" as its first line, and the Task Manager shows low processor usage.
Then the first line of the Printer Dialog Box changes to "Now Printing Page
1" and the processor usage goes up to 100% or so. When Task Manager is
active, I usually do not see the "Now Printing Body" line, and the processor
usage stays pegged at 100%.
Thanks for any insight,
Charlie Rowe