Link to home
Start Free TrialLog in
Avatar of absok
absok

asked on

Using WebBrowser to View/Copy/File PDF (VB6)

select a pdf for viewing via common dialog
use shell copy to make a copy of the pdf in another folder
open the the pdf (via navigate (...path...)
....user wants to file this copy
navigate ("about:blank")
...hide the control
name copy as new copy

several times the operation will complete without error, but, then
the readystate of the control never changes from 3 (interactive) to 4 (complete)
therefore, the name command fails with error 75 path/access error
clear the error and retry the name copy as new copy works on XP --- not on vista

Question: how can I get the readystate to change to Complete?
Avatar of absok
absok

ASKER

added sleep to wait 100 ms for readystate to 4 (complete)
name (path2copy) as (path2newcopy) still fails
resume on err.number = 75 will case the name command to work
so, I guess the readystate was from the navigate ("about:blank")
ASKER CERTIFIED SOLUTION
Avatar of absok
absok

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial