• Přihlásit
  • Microsoft.com
  • Česká republika (Čeština)
    Brasil (Português)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)United States (English)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Microsoft Developer Network
 
 
Domů
 
 
Library (US)
 
 
Školení a certifikace
 
 
Download
 
 
Podpora
 
 
Komunita
 
 
Fóra
 
 
 
Microsoft Developer Network > Domovská stránka fór > Windows Presentation Foundation (WPF) > How to host word as a OLE/ActiveX control in WPF?
Odeslat dotazOdeslat dotaz
Prohledat fóra:
  • Prohledat fórum Windows Presentation Foundation (WPF) Prohledat fórum Windows Presentation Foundation (WPF)
  • Prohledat všechna fóra MSDN Prohledat všechna fóra MSDN
 

OdpovědětHow to host word as a OLE/ActiveX control in WPF?

  • 5. července 2007 6:13Larry_zhou Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    Hlasovat, že příspěvek je užitečný
    0

    Hello, everyone,

     

         How to host word/Excel/ppt as a OLE/ActiveX control in WPF?

         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?

     

        Thanks for any advice.

     

    Walkthrough: Hosting an active Control in Windows Presentation Foundation

          ms-help://MS.MSSDK.1033/MS.NETFX30SDK.1033/wpf_conceptual/html/1931d292-0dd1-434f-963c-dcda7638d75a.htm
    • ReagovatReagovat
    • CitovatCitovat
     

Odpovědi

  • 5. července 2007 18:45Chango V. - MSFT Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     Odpovědět
    Hlasovat, že příspěvek je užitečný
    0

    Larry,

    For Office documents, you need more than the setup for hosting ActiveX controls. Office applications can act as active document servers, which implement a superset of the standard ActiveX interfaces and correspondingly require more support from the host than for ActiveX controls.

    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: http://support.microsoft.com/kb/311765. You could bundle that control with your application and host it using WinForms as shown in the Walkthrough you pointed to.

    The easiest 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.

    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 <iframe> to the Office document.

    • ReagovatReagovat
    • CitovatCitovat
     

Všechny reakce

  • 5. července 2007 9:16Neal Hudson Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    Hlasovat, že příspěvek je užitečný
    0
    I know this is PDF and not Word, but the techniques used would be the same, hopefully it points you in the right direction:

    http://blogs.msdn.com/mhendersblog/archive/2005/09/23/473065.aspx


    • ReagovatReagovat
    • CitovatCitovat
     
  • 6. července 2007 6:06Larry_zhou Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    Hlasovat, že příspěvek je užitečný
    0

    Dear Chango,

      

        Thanks for your information. They are very useful for me.

    I'll learn and try.

    • ReagovatReagovat
    • CitovatCitovat
     
Potřebujete pomoc s fóry? (Nejčastější dotazy)
 
© 2009 Microsoft Corporation. Všechna práva vyhrazena.
Upravte svůj profil
|
Kontaktujte nás
|
Elektronické zpravodaje
|
Právní informace
|
Ochranné známky
|
Osobní údaje