Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExecWB and specifying a printer
Message
From
18/10/2004 10:50:25
 
 
To
14/10/2004 17:41:19
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00951574
Message ID:
00952274
Views:
8
I almost have this working properly, but now I have a timing issue. What I am attempting to do is temporarily change the Windows Default Printer (if necessary), print an html document using ExecWB, and then change the Default Printer back. All of this is working just fine about 50% of the time, but sometimes the Windows Default Printer is getting changed back too quickly. I guess I am looking for a way to make sure that execWB is finished (ie, check the print spooler to see if my document has finished printing.)

Here is my code that is being fired from a Form's command button:

IF gcPrinterName <> gcDefaultPrinter
*!* Printer in evip.ini is not the same as the Default Printer
oNet.SetDefaultPrinter(gcPrinterName)
ENDIF

thisform._wEBBROWSER41.execWB(6, 1)

IF UPPER(ALLTRIM(SET("PRINTER", 2))) <> gcDefaultPrinter
*!* Change the Windows Default Printer back
oNet.SetDefaultPrinter(gcDefaultPrinter)
ENDIF

thisform.Release()

Thanks again Yuri and Sergey for helping me this far ;)
Previous
Reply
Map
View

Click here to load this message in the networking platform