I am having difficulty setting the print job document name with VB6. I don't want to use the method of temporarily changing the app.name because 99% of the time I am running the program from the development environment.
I managed to get the printer queue to show the document name I set by using the following method.
Private DI As DOCINFO
...
DI.lpszDocName = DocName
job_id = StartDoc(Printer.hDc, DI)
Now herein lies the problem.
No matter what I do, once I have called the StartDoc function, the next command that sends data to the printer gives a 482 error. no matter if its printer.paintpicture or if its printer.print. program crashes every time. I have tried using setjob to correct the issue but I really have no idea how to use it properly. I have been looking for solutions to this problem but it seems like no solution exists. HELP!
I managed to get the printer queue to show the document name I set by using the following method.
Private DI As DOCINFO
...
DI.lpszDocName = DocName
job_id = StartDoc(Printer.hDc, DI)
Now herein lies the problem.
No matter what I do, once I have called the StartDoc function, the next command that sends data to the printer gives a 482 error. no matter if its printer.paintpicture or if its printer.print. program crashes every time. I have tried using setjob to correct the issue but I really have no idea how to use it properly. I have been looking for solutions to this problem but it seems like no solution exists. HELP!