Re: Print Automation with IE7

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Nov 8, 5:25 pm, mr_unreliable <kindlyReplyToNewsgr...@xxxxxxxxxxx>
wrote:
GeekGrrl, when you "open" the web page, are you testing
whether the page has finished loading before starting
to print?

Note: the preferred method is to use "ready state":

--- <snip> ---
Const READYSTATE_COMPLETE = 4

Do ' wait until page loaded
WScript.Sleep 10 ' allow for processing events
Loop Until oIE.ReadyState = READYSTATE_COMPLETE
--- </snip> ---

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)



geekgrrl wrote:
I'm having a problem automating printing html/web pages with IE7 and I
am wondering if anyone else has had the same problem.

When I print large numbers of html docs or web pages, I am finding
that IE7 is occasionally sending only a single page to the printer.

My sequence is this:

set default printer
while ( files left)
{
open html file
print html, wait for completion
}

I will randomly get a print job that has only a single page; it
contains only the page header / footer information that IE prints and
no contents.

I have been able to duplicate this with IE7 on Vista 64 and on XPSP2.
Has anyone else seen this issue?

Geekgrrl.- Hide quoted text -

- Show quoted text -

Yes, I am, sorry I should have mentioned that.
That is originally what I thought the problem was, but I traced
through the code and the readstate is being changed by IE and I am
waiting on it.

.