So, the issue is that your PC is printing the receipts out of order? It's not the macro that's doing that, but your PC. Nevertheless, a slight change to the macro will fix it.
Get ready for a tiny bit of programming.
Open the document. Press Alt-F11. You should now be in the vb editor, with the macro code showing. In the Sub named 'ReceiptPrint', find the line:
.Printout
Change this to:
.PrintOut Background:=False
That's all there is to it. Press Alt-F11 again to return to the document.
The '12961' is a non-issue. The macro is coded so that it terminates with the last printed No. +1, as the default starting No. for the next sequence. It does that to make life easier.
The Screen display doesn't update while the code is executing, so whatever was displayed when you started remains displayed until it's finished. I wrote it that way for speed. With the changes to the printout command, above, some of that performance will have been lost. If you want to see the numbers updating, go back into the vb editor and delete the lines:
Application.ScreenUpdating = False
and
Application.ScreenUpdating = True
Then, after the line:
.Fields.Update
insert:
Application.ScreenRefresh
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|