Solved

IWebBrowser and Printing

Posted on 1997-03-25
2
261 Views
Last Modified: 2013-12-03
Assuming I have managed to embed a WebBrowser control from the ActiveX SDK client window that I have created, how can I instruct it to print its content?
0
Comment
Question by:xen15
  • 2
2 Comments
 

Accepted Solution

by:
lohcheek earned 200 total points
ID: 1334217
Hello,

//the code fragment

LPDISPATCH disp;
IOleCommandTarget* target;

WebBrowser_Object->QueryInterface (IID_IOleCommandTarget,(void **)&target);
target->Exec(NULL,OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER,NULL,NULL);

I have assumed that you have already obtained the WebBrowser control pointer (WebBrowser_Object). The details of this can be found in Microsoft's web site on the IE WebBrowser control.
0
 

Expert Comment

by:lohcheek
ID: 1334218
With respect to the above answer, WebBrowser_Object should be the IDispatch instead. Sorry for the mistake.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question