How to embed a word document in CView

I am looking for some code sample embed an existing word document
in a view.

MSDN has a sample to embed a new word document in a view. But it
has an extra control in the windows, and it doesn't let me to
open an existing word file.

TIA for any help.
6/23/2010 11:01:45 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 21

This is not a simple task.  You are becoming an OLE client with an embedded document. This
means that clicking on the document activates Word (an OLE out-of-process server) and this
means Word will replace your menu items, etc.

MFC provides an *amazing* amount of assistance in doing this, but it still is not easy,
from what I've seen over the past 15 years or so.  

Embedding an existing .doc file (or .xls, the next most common example) is not
substantially different from embedding a new one, and yes, they both require a control.

Instead of looking for a Word example, try to find a spreadsheet example.  The Office
framework is identical in this regard (I seriously considered embedding PowerPoint in my
PowerPoint indexer, but it was easier just to launch it as a separate program and control
it with Automation.  But for a brief few hours, I seriously considered the idea)

On Wed, 23 Jun 2010 19:01:45 -0400, emcz <> wrote:

>I am looking for some code sample embed an existing word document
>in a view.
>MSDN has a sample to embed a new word document in a view. But it
>has an extra control in the windows, and it doesn't let me to
>open an existing word file.
>TIA for any help.
Joseph M. Newcomer [MVP]
MVP Tips:
6/24/2010 1:45:52 PM

Similar Artilces:

protect a document so it cannot be amended by others but it can b.
Hi is there a way in Excel that I can password protect a document so only I can make changes but others can read it and filter it when they require information. I have tried to put a password on but it wont let anyone else use the filters in the spreadsheet. Please help! Hi see: -- Regards Frank Kabel Frankfurt, Germany "S_H" <> schrieb im Newsbeitrag > Hi is there a way in Excel that I can password protect a document so only ...

Combine Word Docs
Office 2007 I have two different word documents that I would like to combine into one for back and front printing. Can I do this? If you mean that you want one to print on one side of the page and the other on the other side, you can't (at least not without a LOT of work). It would be much more practical to print one, turn the output over, and print the other (in reverse order, if desired). -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA "Canon" <> wrote in message ...

How to let Embed Excel WorkSheet support Excel Addins?
Hi Gurus I wrote an application which has an embed excel table. I tried to allow user using "Solver" and "Data Analysis" addins when they working on this table. But when I click on "Solver", it will report an runtime error and "Data Analysis" just do nothing(No dialog popup). I tested this two addins on Microsoft Word (by insert a Excel Table in word document), same problem happened. Is this mean embed excel worksheet can not using Addins? Is there any solution on this? Robin Thanks "Robin Wei" <> д���ʼ� ...

embed dialog into another dialog
how can be done? thanks what do you mean 'embed'??? you can open a dialog from another dialog just like you would open it from another application. "Mastupristi" <> wrote in message > how can be done? > > thanks On Wed, 28 Jul 2004 11:51:50 -0400 "Dave" <> wrote: > what do you mean 'embed'??? you can open a dialog from another dialog > just like you would open it from another application. I mean that I wand to define 2 dia...

Word documents from MAC not able to open on Word PC
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I'm using Office Mac Word 2008 to create school papers, and when I submit them, email them...etc to a PC, the documents are not able to be opened. It tries to open them in Works, but still fails. What am I doing wrong? This should be a simple process, but it appears that it's not - help please. There are several potential considerations, some of which you can't control. What You Can Do: On your end, always use the checkbox in the Save As dialog to 'Append file extension'. Otherwise t...

Documentation for Security access
We are under a SOX audit and they want to see a list of what assess a person needs to do certain functions such as enter an invoice, print a check, etc. I printed off the User Security Report, but they want to know what each item on that list means. I asked Microsoft and they don't have anything like that. Any other public or private companies have any ideas? Kentucky Deanna Post your email address and I will send you some of the documents I have. "Kentucky Deanna" wrote: > We are under a SOX audit and they want to see a list of what assess a person > needs to do c...

print the search results in Word
How do I print the search results from Word that includes the page number for each search result. Does anyone know a macro or does Microsoft Words have the option? The following macro will write the page number(s) of each occurrence of the searched text to a new document. Dim oDoc, oNewdoc As Document Dim sText, sPage As String sText = InputBox("Enter text to find") Set oDoc = ActiveDocument Set oNewdoc = Documents.Add oNewdoc.Range.Text = "'" & sText & "' found on page(s) " oDoc.Activate Selection.HomeKey wdStory Selection.Find....

Can no send email from Word
Problem: I can no sent Word document, or Excel doc directly from this applications use E-mail button. I get error: "The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was ''. Subject 'test', Account: '', Server: '', Protocol: SMTP, Server Response: '553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)', Port: 25, Secure(SSL): No, Server Error: 553, Error Number: 0x800CCC79" Outlook work normally. What se...

Why does Word lauch automatically with Outlook?
I use Word to edit/view emails in Outlook. However, of late Word has stared to launch itself automatically (with no document) in a separate window whenever I launch Outllook for the first time. Is there a config that would fix this problem? -- Srini Iyer If you post your version of Outlook/Word, someone could probably answer you as there are fixes dependent on version. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. Af...

Word 2007
I have a very large Word document where, everytime I open it, Word recalculates the number of words in the document, and runs and runs and runs, until it finally "counts" all the words (at least, that's what I think it's doing) and opens the document. Is there a way to turn off that Word Count function?? This can take several minutes, and it even recalculates (and waits) if I just save what I've revised so far and then want to continue editing, which is verrrry annoying. Thanks. -- Cyndie Browning Software Support Specialist GableGotwals Tulsa, OK Is t...

Can I use Word 07 pro with a pen tablet
I am trying to sign my name and make notations with a wacom pen tablet can I do it in word. You'd have better luck asking this in a newsgroup related to Word. This one's for questions about Access, the database product that's part of Office Professional. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "maryocon" <> wrote in message >I am trying to sign my name and make notations with a wacom pen tablet can >I > do...

Reading plain text mails in Outlook 2002 with MS Word
In Outlook 2000, by using MS Word as the mail editor option, if i double-click on a message which is in Plain Text format, Word opens it and nicely formats the message so that in long messages with multiple conversations, each message in the long conversation is nicely separated and formatted which makes it very readable. However, in Outlook XP and above, MS Word is being used only to open messages in Rich Text format and Outlook's default editor is used to open Plain Text mails, which is devoid of any formatting and makes long mails with multiple conversations pretty unreadable. Is there ...

Path to Lookup from another document
Hi, first post ever ever! Can you help? When using worksheet "A" I want an equation to look at one cel reference in worksheet "B" searching for same reference and pul information through. Worksheet "B" may not be open when lookup needs t operate -- Boethius ----------------------------------------------------------------------- Boethius1's Profile: View this thread: Open workbook B. Goto workbook A. In your cell, type = then Ctrl-F...

How to convert FIGURES in one column to WORDS in another column?
I want to get the amounts put in one column in "Figures" to appear it in another column in "Words" . Is it possible in Excel ? See below to have a clear idea about what I am saying. Example- USD:1,013,566.38 (in Column A) to Appear As "USD:One Million Thirteen Thousand Five Hundred Sixty-six & Cents Thirty-eight only" Please Guide, if anybody can. -- Kind regards, Niek Otten "Shashank Virkar" <Shashank> wrote in message news:282246B7-52DA-44BB-991...

Using WORD document as report
Hi, I have a registration form that was created with Word. It contains information such as player name and address and contact info, etc etc. I'd like to somehow import this form into Access so I could have a database instead of having to print the Word form for each new player and then entering everything by hand. Am I making sense ? Basically I don't want to have to redo my form, I want to import it into Access to use as both a form to enter new info AND as a report. I also want to print both the completed form as well a a receipt once the info has been entered. Can anyone ...

Help needed: Word 10 for Mac and XP PC Word files' non-printing characters
Any time I bring a Word XP (for Windows) file home from the office and take advantage of Word's interoperability with Macs to open it on my Imac under OS 10.3, the Mac copy of Word (Office 10) insists on displaying the non-printing characters (tabs, paragraph marks etc) from the PC file and when I try to turn them off with the usual "hide" command on the Mac they will NOT go away. Anyone know how to troubleshoot this ? Check the View tab in Preferences--they can be turned on permanently there. Dayo "Michael Bryan" wrote: > Any time I bring a Word XP (f...

How do I import a plain text file into a word worksheet?
I am using Word 2003. How do I import a plain text file into a data worksheet? If the text file is delimited into records using a particular character - see and jump in where your text file matches the illustrations. If not, then explain exactly what you have and what you want to do with it. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site Word MVP web site <>&g...

OLE Drag & Drop with non CView class
Hello everyone, Drag & Drop works for CView class, but I am trying to implement OLE Drag&Drop between two different CWnd derived classes. I tried the get the class where the drop target should happen by double inheritance from CWnd and COleDropTarget in order to receive all dropping messages. In this case I got ambiguous conversions for the message map of a button (CButton) which is children for the drop target window . If I get rid of this message from message map it compiles without errors. I need to get this problem around somehow. Any suggestions would be greatly appreciated. Re...

Publisher -pop-up when I try to open a saved document: cannot ope.
Trying to open already saved documents in Publisher 2003, I get a pop-up message saying: Publisher cannot open files from a diifferent version and I can't open the document yet if I open Publisher some of those documents are listed in the recent files and I can use them. If you have Norton, disable "script blocking", in Norton options, disable "Office Plug-ins". -- Mary Sauer MS MVP news:// "Jan P" <Jan> wrote in message news:C4C7EBBE-C9DE-4CF1-...

Excel Macro to find instances of a word
I'm in the process of learning VBA and am having some troubles writing an excel macro to find all instances of a word (usually in conjunction with other words) and delete the row containing it essentially I'd like row 5 below to do the following: If Cell contains word *foo* OR *baz* then such that it would find individual instances of foo and baz but also foobar Although overall a rather large macro, the code surrounding 1 Cells.Sort Key1:=Range("C1") 2 3 totalrows = ActiveSheet.UsedRange.Rows.Count 4 For Row = totalrows To 2 Step -1 5 IF CELLS(R...

Word Error Message: word cannot start the convertor msw rd63.wpc
Using Word 2002 SP3 Office10 on XP Home. I got the above message when I tried to open a document I had created and saved to my documents. I click ok and word opens but the document is blank. Its also shows as blank in my documents. Help please -- maur Hi Maur, These errors occur after installing the KB973904 security update. Apparently, uninstalling that update will fix the problem. -- Cheers macropod [Microsoft MVP - Word] "maur50" <> wrote in message > Usin...

Page Layout like Word?
We're using Excel 2002. I have a user that is telling me that he works in Excel with page layout exactly like Word (with the margins and gray area between pages). I showed him Print Preview, but that's not what he means. Page Break Preview is also not what he means because it doesn't show the margins. Is he right? Is there a print layout view in Excel like Word? Hi AFAIK there's no such view -- Regards Frank Kabel Frankfurt, Germany "Doreen" <> schrieb im Newsbeitrag news:eZxDm9CwEHA.1524@TK2MSFTNGP09.phx.gbl... > We're using...

Newbie ?: Why are there dots between words in my text boxes?
I just started in Publisher and am having trouble finding how to stop from getting dots when I use the space bar in a text box. davehDFW <> wrote: >I just started in Publisher Version number please??? davehDFW wrote: > I just started in Publisher and am having trouble finding how to stop > from getting dots when I use the space bar in a text box. =================================== Try this... Go go...View... deselect...Special Characters. Or...type... Ctrl+Shift+Y -- John Inzer MS Picture It! - Digital Image MVP Di...

spell check on Word X for macs
In the preferences for Word, the spelling and grammar feature is=20 unavailable--I can see it on the list of preferences but can't click on = it (it's=20 backgrounded, sort of). Therefore, my spelling and grammar check isn't=20 working. Do I need to load it separately or something? help! I think deleting the prefs file fixes this. (Common description of that state is "greyed out", by the way). Run through the troubleshooting techniques here--try (hit refresh a few times in Safari, or use a different browser) You...

How do I copy my chart into a NEW workbook using the EMBED formula? Thanks, FLKulchar You don't, you copy it and paste it. The pasted chart will still be linked to the old data source, so if you want to plot different data in the copied chart, you need to do it a bit differently. Copy the chart and its source data, the whole worksheet, then paste the new data onto the copied worksheet. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions _______ "F. Lawrence Kulchar" <> wrote...