473,609 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sometimes ExecWB doesn’t print

I'm using an instance of SHDocVw.Interne tExplorer 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.Interne tExplorer ie = new SHDocVw.Interne tExplorerClass( );
SHDocVw.IWebBro wserApp wb = (SHDocVw.IWebBr owserApp) ie;
wb.Visible = false;
ie.Navigate("ab out:blank", ref noValue, ref noValue, ref noValue, ref
noValue);

while (thereArePagesT oPrint)
{
ie.Navigate(pag e, ref noValue, ref noValue, ref noValue, ref noValue);
while (ie.ReadyState != SHDocVw.tagREAD YSTATE.READYSTA TE_COMPLETE)
Application.DoE vents();

ie.ExecWB(
SHDocVw.OLECMDI D.OLECMDID_PRIN T,SHDocVw.OLECM DEXECOPT.OLECMD EXECOPT_DONTPRO MPTUSER,ref noValue,ref noValue1);

}

Nov 17 '05 #1
0 1225

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

Similar topics

3
4145
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"); } // Today2SQLDatetime Most of the time this works just fine. For today, for example, it
5
2015
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 messes up its variable bindings once in a while. Suddenly, one of several local variables gets rebound to the object it was bound to one step up in the recursion. The relevant part of the code looks like this with print statements
1
6038
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? axWebBrowser1.QueryStatusWB(SHDocVw.OLECMDID.OLECMDID_PRINT); object o = ""; SHDocVw.OLECMDID Print = SHDocVw.OLECMDID.OLECMDID_PRINT; SHDocVw.OLECMDEXECOPT PromptUser = SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER; axWebBrowser1.ExecWB(Print,...
0
1057
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
4270
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()). However, I need to print to the server's printer. I need to print the fully rendered .aspx page from the codebehind .aspx.cs page to the server's printer. I've tried using SHDocVw.InternetExplorer and SHDocVw.WebBrowser but I just can't seem...
0
2058
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 ShDocVw.dll web browser on it to navigate to the URL of another ASPx page that generates the contents I'm interested in printing and then trying to do a AxWebBrowser1.Exec to print client-side to a mapped local/network printer on the user's...
4
1569
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 page count in Printer and Faxes still increments. I can cancel the entire print job but can not find anything that will enable me to skip one page.
1
1559
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 I don't know how to import them. Any ideas?
0
5309
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 footer = null; object o = null; InternetExplorerClass ie = null;
0
8139
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8091
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8579
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7024
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5524
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4098
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2540
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 we have to send another system
1
1686
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.