redheadpgr
Programmer
I have a macro which retrieves data from a database after a user enters an order number in an inputbox. After the macro retrieves the data, it puts the info in some bookmarked places in the active document in MS Word. Afterward, the macro calls the command to print the document:
ActiveDocument.PrintOut Range:=wdPrintAllDocument
After this command, the program loops to prompt the user to enter another order number. If they select cancel, the macro will end execution.
The problem is this: the printer does not start printing until the macro has ended execution. Therefore, there may be several jobs in the print spooler. I need this to print the document as soon as it runs the PrintOut command.
I have set breakpoints in the macro right after the PrintOut command and in break mode it will print the document. Is there something in the VB environment that hangs the print queue?
Any help would be most appreciated. Thanks.
ActiveDocument.PrintOut Range:=wdPrintAllDocument
After this command, the program loops to prompt the user to enter another order number. If they select cancel, the macro will end execution.
The problem is this: the printer does not start printing until the macro has ended execution. Therefore, there may be several jobs in the print spooler. I need this to print the document as soon as it runs the PrintOut command.
I have set breakpoints in the macro right after the PrintOut command and in break mode it will print the document. Is there something in the VB environment that hangs the print queue?
Any help would be most appreciated. Thanks.