Prev: Stay resident dll
Next: Exception Semantics question
From: emcz on 23 Jun 2010 19:01 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.
From: Joseph M. Newcomer on 24 Jun 2010 09:45 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) joe On Wed, 23 Jun 2010 19:01:45 -0400, emcz <emcz1999(a)yahoo.com> 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] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
|
Pages: 1 Prev: Stay resident dll Next: Exception Semantics question |