Using the CHtmlView object with Print Preview (ExecWB)

I have a problem.  When the user clicks a button on my application, I create 
a hidden CHtmlView object, export some data as HTML and load it into the 
browser.  This is all done inside my dialogues button message handler.

I then want to invoke the print preview using ExecWB but nothing works.

I found out that if I post a button click message to another hidden button 
and do the ExecWB from there that the preview will display.

I also found that I must delete and re-create the hidden browser for the 
preview to synchronize corectly.

My problem is that one some computers I am being told that the preview still 
doesn't show and I think it is because of this post message approach.

So, with a CHtmlView, this is what I really want to do:

1. create hidden browser (ideally once)
2. export my data to temp html file
3. load html into broswer
4. show print preview

It must show the right data (not the last but one) and all be done without 
this hidden posting of messages.  Then I think my answers will be solved.  
But I have tried alot and got no where in trying to do it like this.

Thanks for any help as I do appreciate it!
0
Chuckie (7)
1/24/2007 6:25:01 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
816 Views

Similar Articles

[PageSpeed] 59

Reply:

Similar Artilces:

How to use Outlook as a phone book?
Is there any program that interfaces with the address book of Outlook whereby I can bring up a name and have the option to email, IM (MSN/Skype/Yahoo Messenger/Paltalk), phone or fax them? I would need a fax modem with full duplex of course for phoning and faxing. And a mic or headset. It just seems redundant not to use the computer as a phone. The possibilities are endless for contact management, not to mention incoming calls. They could all be logged on the computer. The downside is the computer has to be on all the time. But for many of us, it is anyway. Gary...

Need help!
Hi all: I am trying to extract some data from an Access query using MS Query while in Excel. The access query will extract the data from the data source without any problems. (I can even cut and past the data from the access query to the excel spreadsheet.) The problem arises when I go to refresh the data in the excel spreadsheet using the MS query. I get the following error message: "[Microsoft][ODBC Microsoft Access Driver] Invalid character value for cast specification on column number 4 (SumofSumofTransValue)" Can anyone shed some light on this problem? Everything wo...

Spread sheets for keeping records of Art prints, printing & sales
Has anyone organized sales and production of fine art photographic prints. I need to keep listing of subjects name and address, mnodel release or not, and other information that comes up related to records I may need in the future. Thank you you dont need a spreadsheet - you need to look at a database "Hilary Sloane" <Hilary Sloane@discussions.microsoft.com> wrote in message news:E6ABEB72-7473-4139-9FA4-3001D50D74B9@microsoft.com... > Has anyone organized sales and production of fine art photographic prints. > I need to keep listing of subjects name and address, mn...

Print only current record
Using Access 2007. Hi all, I'm trying to figure out how to show a report only displaying the current record. I created a db using the Issues Database as a template. It has a form called Issue Details which has a button that prints a report of all issues. I created a new button and want to be able to print the same report but only with the record that is selected on the form. I searched the 'net and based on what I found I added this to the button's Click event: -------------------------------------- Private Sub Command188_Click() On Error GoTo Err_Command188_Click Dim MyFor...

+Windows7 +ShowHTMLDialogEx +"COM objects not being instantiated"
Why are my COM objects not being instantiated (via the <object> tag) using ShowHTMLDialogEx from MSHTML.dll in Windows 7 (32bit) with IE8? The exact same application works perfectly in XPProSP3 with IE8 installed, but not with Windows7 IE8. I know that my COM objects are not being instantiated in W7 due to an error message that I have similar to this <object...>ERROR: ....</object>, and my error message is displayed. My COM objects are all marked safe for scripting, although not digitally signed, but that should not make any difference when using ShowHTMLDi...

use only PART of a # in excel?
OK I know this might sound like a strange question. But I am trying to write a formula for a machine that I have in my factory. It is a multi step formula, and in one of the steps it will give a result, for example, of 127.6543. Is there ANY possible way for me to ask the next part of the formula to ONLY use the .6543 without taking the 127 into account, or without having to tell it to subtract the 127 manually (and ALSO vice versa meaning I need it to then use ONLY the 127 and NOT the .6543) ?? I hope I am making myself clear, because Im not even sure that I understand what I am asking ...

How to print CD/DVD labels on standard two-per-sheet paper?
Every time I download templates to print CD/DVD labels, I see only one label on a small sheet of paper. When I go to the office supply store, I only have the option of buying paper with the standard two-label design. How do I create and edit CD labels where I can work with both onscreen and then print both at once (different top from bottom) in such a way that everything is aligned with the cutout sticker labels on the page? Anytime you need to edit both halves of your label you need to setup the page manually. Most CD/DVD templates will print two to a page. Select the label you want...

Access Form Printing issue
Hi Guys, I have an issue wiht ACCESS Form printing. One Form with Pivot table with 50+ pages, when I do a print preview, It shows me 50+ pages, but after 36th page, all following pages are empty. And when do the printing, all pages after 36, are empty too. Any suggestion would be appriciated. Thanks Tony Forms aren't intended for printing. That's what reports are for. There's very little built into Access to allow you to manipulate how a form prints. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Tony" <Tony@discu...

Using Sum for database data
I have a sql query that imports data from a MySQL database. When the data is brought into Excel I can't sum the numbers. Without all of the details, I'm guessing that the SUM equates to zero. If that is true, the values may be text that appear to be numbers. Try this to correct the problem: 1)Put a 1 in a blank cell and select that cell 2)Edit>Copy 3)Select the imported values 4)Edit>Paste Special --Select Multiply --Select Values Click the [OK] button. Does that resolve the problem? -- Regards, Ron "jnorton" wrote: > I have a sql query that imports data ...

No offline folder option in Outlook 98 using NT
The Offline folder File Settings button is missing in Microsoft Exchange Server Advanced properties. Can only get it back by rebuilding the profile. Does anyone know a fix or Registry change? http://support.microsoft.com/default.aspx?scid=kb;en-us;277780 (try changing the 9.0 to 8.0 and see if this works.) -- Neo [MVP Outlook] Due to recent events in spam and malicious programs, all e-mails sent to this account will be deleted w/out reading. "Rob" <anonymous@discussions.microsoft.com> wrote in message news:1236401c3f630$180d6520$a001280a@phx.gbl... > The Offline fold...

Using 2001 but...
I'm still using Microsoft Money 2001 for my checkbook and don't need a lot of bells and whistles, so it's been fine so far. But one thing I'd like to have, is to have it backup to my hard drive when I hit ctrl-S for save. Can any future versions do that? See info copied from Money 2001 Help below, CTRL+S is used to Split a transaction. Keyboard Shortcut for backup to hard drive is..... Alt, then F, then B, then down arrow, then Enter. You will notice each item on the menu bar has one underlined letter. By pressing Alt then that underlined letter will cause it's me...

Changing Photos in a Image Object
I have named a file path and file location in VB to locate a particular photo. As the user selects different items from a droplist the file path and name change. In the change event on that droplist I need to know how to call the load event for the Image object. So far I have tried: Image1.Picture = LoadPicture(PictureFileName1) - Where PictureFileName is my path and file name as well as hard coding to Image1.Picture = LoadPicture("e:\monthlyreport\Photo1.bmp") I don't understand the correct syntax to change the picture file. Please help. Thank you! Hi Troubled...

Is there a way to display a graph using a equation?
I have this equation y = 45.67 + 2.38X and would like excel to show a graph of this, can it be done? Sure. Put your lowest X value into cell A2. In cell A3, use the formula = A2 + 1 Change the 1 to the interval that you are interested in In cell B2, use the formula =45.67 + 2.38*A2 Copy B2 to B3, then copy A3:B3 down the column as far as your need, then use Insert / Chart and choose XY scatter. HTH, Bernie MS Excel MVP "pokdbz" <pokdbz@discussions.microsoft.com> wrote in message news:2258E185-4F7E-4393-A390-4278F4A1DBFF@microsoft.com... >I have this equation y =...

Use Access Data in Excel
I want to use record maintained in a MS Access database in an Excel worksheet. I'd like to have a series of drop-downs on an Excel worksheet that display records queried from an Access table. Basically the Excel sheet is an estimation sheet for jobs and the drop downs are to contain parts that have been entered into an Access database table - the parts are to be chosen from the populated drop down list. I've seen a few post here that sort of deal with something like that but not quite. Any suggestions as to how to go about this? Jimmy, Look at Data - Import external data, Data...

statement print-out only open balances
Hello Hope someone can help I need to remove all details of transactions with zero balance (paid) from the list On my bi-monthly closing statements, and show only the transactions with an open balance. We have customer with a large history and the statements get very large. I have a statement that only prints this month’s activity, but I still need the old open transactions thanks this works great :) "Morris Paint" wrote: > See if this will do what you need. You may have to make some modifications > to the text on it but I think it will work. We ran into the same issu...

apostrophe replaced by multiple symbols when email is printed
Windows XP - Exchange 2003 - Outlook 2003 In some cases when a person in our office sends emails to others in our office and those people then print the email, the apostrophes are replaced by a string of characters like: []$B!G[](B where [] is the nonprinting character symbol. Something very similar is printed in place of an arrow symbol. He recently installed a Japanese language pack. I've checked the Control Panel > Language settings and also the language settings in Outlook and couldn't see anything obviously wrong. I've also deleted his user profile and reinstall...

Selective report printing please help
Hi Under Transactions menu > Financials > Series post Say i check mark 2 or 3 records and post them I want to selectively print eg - 1st page of report ok print , 2nd page not required. etc Rick Unfortunately, what you want to do is not possible. -- Charles Allen, MVP "Rick" wrote: > Hi > > Under Transactions menu > Financials > Series post > Say i check mark 2 or 3 records and post them > I want to selectively print eg - 1st page of report ok print , 2nd page not > required. > etc > > Rick ...

Can't print a monthly calendar
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: imap Hi, <br> I have a problem with printing a monthly calendar from my older computer using OS X 10.4. <br> When I try to print, the usual dialog box comes up, but there is no preview and it doesn't matter whether I try to print, save as PDF (save box comes up), preview or anything, nothing happens. <br> I press print, save, preview and the dialog box disappears and that's all. <br> No error, no nothing. <br> I can print emails etc from the same applica...

How to convert CString object to data type?
How can I convert CString from a EDIT control Dialog to data type for calculation? thanks, Take a look at _stscanf/_ttoi. --- Ajay Y Xu wrote: > How can I convert CString from a EDIT control Dialog to data type for > calculation? > > thanks, Hi Y Xu, Can you be more specific , what type do you want it to be converted to ? /Kiran Y Xu wrote: > How can I convert CString from a EDIT control Dialog to data type for > calculation? > > thanks, On 8 Jun 2006 07:31:57 -0700, kiran.inbng@gmail.com wrote: >Hi Y Xu, > >Can you be more specific , what t...

money 2003-how do u print a list of checks written
is there a way to print out a list of the checks that I wrote for the entire year? In microsoft.public.money, Dr. Allan Wohl wrote: >is there a way to print out a list of the checks that I wrote for the entire >year? > Customize the Account Transactions report. Limit the account(s) to your bank(s). After each change, click Apply to see the effect. On the Amount tab, specify the range -0.01 to -9999999 to limit the report to outgoing money. In Rows & Columns consider using SubtotalBy:None. In Payee, you can adjust to get rid of payees you don't want. Check the other t...

I need help uploading my site on to the internet using Microsoft .
I have no idea how to upload a site to the net, can some one help? Email @ greenday_girl97412@hotmail.com (1) We don't do personal responses. That defeats the purpose of a public newsgroup. (2) There is a group specifically for web issues - microsoft.public.publisher.webdesign (3) It's going to depend on where your site is being hosted. Have you asked them any questions about how to upload files to their server? -- JoAnn Paules MVP Microsoft [Publisher] "Kay_swa" <Kay_swa@discussions.microsoft.com> wrote in message news:52985B74-C296-4529-ADAA-A28A2994812C...

Passing object derived from CObject to function
Hi, I have an object CSubPlugIn which is derived from CObject and has an assignemnt operator. I wish to pass an instance of this object to a function in my CMyApp object. I have declared the function in CMyApp.h: void runSub(CSubPlugIn sub); and defined it in CMyApp.cpp: void CMyApp::runSub(CSubPlugIn a_subPlugin) { // log name of sub writeLog(a_subPlugin.getName()); } // end runSub which all compiles fine, but when I come to call it from InitInstance: BOOL CMyApp::InitInstance() { CWinApp::InitInstance(); CSubPlugIn sub; runSub(sub); } I get the error: error C2664: ...

xl Headers and Footers always use 3/4 inch side margins???
hi Group, I was annoyed that the header and footer side margins didn't line up with the body of the document. There are ways to adjust the top and bottom of the header/footer margins (in the print preview, for example), but I couldn't find any way to adjust the side margins. Then I noticed in the manual (an old one) that: "Head/Footers always use 3/4in margins". Is that still true with xl2K??? In an effort to circumvent the 3/4in side margins, I attempted to add spaces to the left side of the header. While a crude approach, this did work in the sense that I was able to ...

How to put a publisher publisher print onto a part of a website?
I have a shop on eBid in UK. I wanted my description of my items I sell to look professional or colorful; creative. When I create a black publication print, copyand paste onto the auction's editing area, it actually duplicates on other auctions I've done the same way. How do I copy and paste a page onto this webiste? Do I need to save it under web page or word or something else? Please help! Don't count on Publisher's html to work reliably anywhere but IN a Publisher web. If it's duplicating in other auctions, then you're doing something incorrectly within eBi...

Outlook XP using 100 % CPU
Hi, my problem is my Outlook XP using 100 % of CPU when I receive more than 20 message. My configuration is: XP Pro SP2 last hotfix Office XP SP3 last hotfix The CPU is Pentium 4 - 2,8 GB I just try to change any configuration on Outlook. Can help me someone? "Senior" <takaya@supereva.it> wrote in message news:Oy7uX7CIGHA.3700@TK2MSFTNGP15.phx.gbl... > Hi, > my problem is my Outlook XP using 100 % of CPU when I receive more than 20 > message. Same thing happen when you disable e-mail scanning in your anti-virus program? Using any anti-spam programs? > My ...