473,486 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sometimes ExecWB doesn’t print

I'm using an instance of SHDocVw.InternetExplorer to print HTML pages.
Unfortunately one of hundred pages doesn’t print. Are the pages printing to
fast? Do I need some kind of delay?
I'm using this code.

SHDocVw.InternetExplorer ie = new SHDocVw.InternetExplorerClass();
SHDocVw.IWebBrowserApp wb = (SHDocVw.IWebBrowserApp) ie;
wb.Visible = false;
ie.Navigate("about:blank", ref noValue, ref noValue, ref noValue, ref
noValue);

while (thereArePagesToPrint)
{
ie.Navigate(page, ref noValue, ref noValue, ref noValue, ref noValue);
while (ie.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE)
Application.DoEvents();

ie.ExecWB(
SHDocVw.OLECMDID.OLECMDID_PRINT,SHDocVw.OLECMDEXEC OPT.OLECMDEXECOPT_DONTPROMPTUSER,ref noValue,ref noValue1);

}

Nov 17 '05 #1
0 1211

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4132
by: Andrew DeFaria | last post by:
I have the following php code: function Today2SQLDatetime () { $today = date ("Y-m-d H:i:s"); print "date (\"Y-m-d H:i:s\") returned $today<br>"; return $today; return date ("Y-m-d H:i:s"); }...
5
2010
by: Magnus Lyck? | last post by:
Something really strange is happening to me (sometimes). I'm using Python 2.3.2 on NT 4.0 as well as win32all-157, adodbapi and db_row. During a recursive call to a method, it seems Python...
1
6014
by: jgctr4 | last post by:
I'm trying to print an HTML file using AxWebBrowser.ExecWB but it it gives a run time error "Trying to revoke a drop target that has not been registered". Does anyone have any suggestions? ...
0
1050
by: bwolfe | last post by:
I need to use a printer other that what's set as the default and without displaying the print dialog. Any ideas?
1
4250
by: Robin Dindayal | last post by:
Does anyone know how I can print a fully rendered .aspx to the server's printer? I know that, if I wanted to print to the client's printer it would be easy (ie. use javascript's window.print()). ...
0
2051
by: Nevhyn | last post by:
Forgive my users' folly, I'm trying to print a number of web documents (.TIFs, .PDFs, text) from the client's browser without opening or viewing the documents first. I have an ASPx page with the...
4
1563
by: Just Me | last post by:
In the handler QueryPageSettings I let the user select a "Skip This Page" option. But I don't know how to handle it if he does. I can set a flag and in PrintPage skip printing the page but the...
1
1552
by: Etayki | last post by:
Thanks for the previous response. Now I want to do something similar: ie.ExecWB(IDM_SELECTALL, OLECMDEXECOPT_DONTPROMPTUSER) However, I don't have the values for the above constants either, and...
0
5280
by: Andrew Meador | last post by:
I have implemented a printing scenario where an html file is printed using the the following code: public void PrintHtmlFile(string url) { RegistryKey IERegKey; string header = null; string...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.