>>>Naomi,
>>>
>>>>What are your results with them?
>>>
>>>Oh, I did not run it, so I can not tell. One thing I would try though, is to create the WMI object just after you start your printing process, before all the "waiting to finish the print" code, that way the time used creating the WMI object will appear to be reduced.
>>
>>Thanks, I'll try that. Still I'm interested if anyone here can try both versions and let me know the times.
>
>First version
function PrintPDF - 60>Second version - very, very bad and sloooowwww.
>
>Tested with
>XP PRO SP2
>VFP9 SP1
>Printer HP Deskjet3900. (2 cents for paper and ink)
>PDF file - 10 pages.
>Acrobat 7.0
Thanks a lot for your tests. I have Adobe 6 at work and the first sample did not work for me. I'll re-test from home.
UPDATE. I tried to test from home: no printer installed, Adobe 7, VFP8 SP1. First version run in 63 sec. (but I have to close Cancel from printer dialog), second displayed the same dialog quickly, then just was waiting forever, so I terminated it.
I think 60 seconds in unacceptable speed for the process, so after tomorrow I re-try from work all the processes + Tracy's code, I may need to come up with another solution.
If it's not broken, fix it until it is.
My Blog