If a VPE preview is open and the program tries to open another preview based on the same .vpe file, the error message No active document is shown.
The code below generate this error
Send OpenDocFile PrintFile // Printfile can be c:\MInerva\Order123.vpe
Send DoVpeSetUpPrinter sPRSfile 1 // Error when this line is executed . sPRSfile can be c:\Minerva\Order.prs
I normally use a local map c:\Minerva for storing temporary .vpe files and user specific settings, but when Windows terminal server is used, all users share the same C:\Minerva, and then the problem turns up especially often. Then it is impossible for two users print the same order simultaneously.
Another common situation is when a preview is hidden behind other windows and the same user by accident tries to print the same document a second time without closing the first preview. After the No active document error is shown, it is shown again a couple of times so the user have to click OK many times to continue.
It is curious that the error is generated by VpeSetUpPrinter, not with the previous line.
How is it possible to avoid this error? Is it possible to check it a preview on that specific file is already open?
Bengt