How to host word as a OLE/ActiveX control in WPF?<p>Hello, everyone,</p> <p> </p> <p>     How to host word/Excel/ppt as a OLE/ActiveX control in WPF? </p> <p>     I found a sample about how to host a ActiveX control in WPF in MSDN. But it is for Media Player and not for office. And I can't find any useful information about the question.  Who can help me?</p> <p> </p> <p>    Thanks for any advice.</p> <p> </p> <p> <table id=topTable width="100%"> <tbody> <tr id=headerTableRow2> <td align=left><span id=nsrTitle>Walkthrough: Hosting an active Control in Windows Presentation Foundation</span> </td></tr> <tr id=headerTableRow3> <td><a><u><font color="#0000ff"></font></u></a></td></tr></tbody></table></p>     <font size=2> ms-help://MS.MSSDK.1033/MS.NETFX30SDK.1033/wpf_conceptual/html/1931d292-0dd1-434f-963c-dcda7638d75a.htm</font>© 2009 Microsoft Corporation. Všechna práva vyhrazena.Thu, 19 Jun 2008 00:15:52 Zde321252-b7d2-4fc9-824b-d2b665209f40http://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#de321252-b7d2-4fc9-824b-d2b665209f40http://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#de321252-b7d2-4fc9-824b-d2b665209f40Larry_zhouhttp://social.msdn.microsoft.com/Profile/cs-CZ/?user=Larry_zhouHow to host word as a OLE/ActiveX control in WPF?<p>Hello, everyone,</p> <p> </p> <p>     How to host word/Excel/ppt as a OLE/ActiveX control in WPF? </p> <p>     I found a sample about how to host a ActiveX control in WPF in MSDN. But it is for Media Player and not for office. And I can't find any useful information about the question.  Who can help me?</p> <p> </p> <p>    Thanks for any advice.</p> <p> </p> <p> <table id=topTable width="100%"> <tbody> <tr id=headerTableRow2> <td align=left><span id=nsrTitle>Walkthrough: Hosting an active Control in Windows Presentation Foundation</span> </td></tr> <tr id=headerTableRow3> <td><a><u><font color="#0000ff"></font></u></a></td></tr></tbody></table></p>     <font size=2> ms-help://MS.MSSDK.1033/MS.NETFX30SDK.1033/wpf_conceptual/html/1931d292-0dd1-434f-963c-dcda7638d75a.htm</font>Thu, 05 Jul 2007 06:13:31 Z2007-07-09T10:59:54Zhttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#3b5f54f6-4e08-4d20-b173-87e15a84d2eahttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#3b5f54f6-4e08-4d20-b173-87e15a84d2eaNeal Hudsonhttp://social.msdn.microsoft.com/Profile/cs-CZ/?user=Neal%20HudsonHow to host word as a OLE/ActiveX control in WPF?I know this is PDF and not Word, but the techniques used would be the same, hopefully it points you in the right direction:<br><br>http://blogs.msdn.com/mhendersblog/archive/2005/09/23/473065.aspx<br><br><br>Thu, 05 Jul 2007 09:16:40 Z2007-07-05T09:16:40Zhttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#2f92d2b8-d884-49c6-ae09-fb8ae97f7acchttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#2f92d2b8-d884-49c6-ae09-fb8ae97f7accChango V. - MSFThttp://social.msdn.microsoft.com/Profile/cs-CZ/?user=Chango%20V.%20-%20MSFTHow to host word as a OLE/ActiveX control in WPF?<p>Larry, </p> <p>For Office documents, you need more than the setup for hosting ActiveX controls. Office applications can act as <a title="http://www.samspublishing.com/library/content.asp?b=Visual_C_PlusPlus&amp;seqNum=227&amp;rl=1" href="http://www.samspublishing.com/library/content.asp?b=Visual_C_PlusPlus&amp;seqNum=227&amp;rl=1"><em>active document</em> </a><em>servers</em>, which implement a superset of the standard ActiveX interfaces and correspondingly require more support from the host than for ActiveX <em>controls</em>. </p> <p>This article discusses the hosting requirements and comes with a C|++ ActiveX control that implements some of the additional functionality and can be used in a standard ActiveX host: <a title="http://support.microsoft.com/kb/311765" href="http://support.microsoft.com/kb/311765">http://support.microsoft.com/kb/311765</a>. You could bundle that control with your application and host it using WinForms as shown in the Walkthrough you pointed to.</p> <p>The <em>easiest</em> way to host an Office document is to navigate the WinForms WebBrowser control to a document. The WebBrowser control wraps the native one, which provides the active document hosting infrastructure. One limitation of this approach is that you won't have have access to the automation API of the Office application server hosting the document.</p> <p>To avoid dependence on WinForms in your WPF application, you can instead use a WPF Frame element. It's also capable of hosting the native Web Browser control (which in turn can host active documents like those of Office), but due to implementation limitations it cannot be navigated directly to a .doc or .xls file. Instead, you can use a dummy HTML wrapper that points an &lt;iframe&gt; to the Office document.</p>Thu, 05 Jul 2007 18:45:15 Z2007-07-09T10:59:54Zhttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#81c9b977-fd8b-4991-9550-13ebca7677d4http://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/de321252-b7d2-4fc9-824b-d2b665209f40#81c9b977-fd8b-4991-9550-13ebca7677d4Larry_zhouhttp://social.msdn.microsoft.com/Profile/cs-CZ/?user=Larry_zhouHow to host word as a OLE/ActiveX control in WPF?<p>Dear Chango,</p> <p>   </p> <p>    Thanks for your information. They are very useful for me. </p> <p>I'll learn and try.</p>Fri, 06 Jul 2007 06:06:25 Z2007-07-06T06:06:25Z