• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 947
  • Last Modified:

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?
  • 2
1 Solution
absokAuthor Commented:
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")
absokAuthor Commented:
Okay - I changed to program to show the original document selected by the user.
Navigate to that location after making a copy in a local folder.
If the user wants for 'file' the document:
navigate ("") - releasing the original document and file the copy.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now