How to Embed Microsoft office in Win form?

▼魔方 西西 提交于 2019-11-28 12:28:27

问题


I am in trouble to host the MS Office in Win form. After doing google i have come across that microsoft has removed dsoframer.ocx. So can anyone please help me how should i host MS office in a winform? I have found some third party tools like Edraw. But i want to do it by own without using any third party tools?

Any help would be appreciated.


回答1:


What you are looking for is called OLE, Object Linking and Embedding. Originally released in 1990, Microsoft Office was the last main Microsoft product that still supported it. Time has not been kind to OLE, the protocol was complicated and very hard to get right. Also very detrimental to program stability, you would not just import another program's windows and UI but all of its bugs as well.

Notable is that the .NET framework shipped without any support for it at all. Office 2007 was the last one that supported it but there were several nasty and unsolvable problems with it. DsoFramer was removed from the Microsoft servers just before Office 2010 beta was released.

This is gone forever and won't come back. Move forward by embedding your UI into the Office program, not the other way around. Very well supported in VS with its Office project templates. There are 3rd party products that support embedding a word processor or spreadsheet in your own program.



来源:https://stackoverflow.com/questions/13468523/how-to-embed-microsoft-office-in-win-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!