Matthew ".NET 247" Reynolds

Matthew Reynolds... software development consultant, author, speaker and trainer

Today's quickie - IE print and print preview

For those who host IE in their own .NET applications (as I do quite often), here's a tip on how to tell IE to print the currently navigated page:

object empty = null;

this.axWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref empty, ref empty);

There are a bundle of other options in that first OLECMDID enumeration.  Enjoy!

Comments

TestUser said:

http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=ee974084-d5c2-44d5-a11b-b2efb96074f8 has a full HTML editor written in C#.
# July 26, 2003 4:01 AM

Hautzendorfer said:

Hello,
is there a possibility to avoid
printing the footnote: filename
and the pagenumbers?

Thanks,
Martin
# October 9, 2003 10:00 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)