如何以Win形式嵌入Microsoft Office? [英] How to Embed Microsoft office in Win form?

查看:128
本文介绍了如何以Win形式嵌入Microsoft Office?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法以Win形式托管MS Office。做完谷歌之后,我发现微软已经删除了dsoframer.ocx。因此,谁能帮助我如何在Winform中托管MS Office?我发现了一些第三方工具,例如Edraw。但是我想自己做而不用任何第三方工具吗?

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?

任何帮助将不胜感激。

推荐答案

您正在寻找的被称为OLE,对象链接和嵌入。 Microsoft Office最初发布于1990年,是最后一个仍支持它的主要Microsoft产品。时间对OLE并不友善,协议很复杂并且很难正确处理。对程序稳定性也非常有害,您不仅会导入另一个程序的Windows和UI,而且还会导入其所有错误。

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.

值得注意的是,.NET框架附带了任何内容对此完全支持。 Office 2007是最后一个支持它的工具,但是它存在一些令人讨厌且无法解决的问题。在Office 2010测试版发布之前,DsoFramer已从Microsoft服务器中删除。

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.

这已一去不复返了,不会再出现了。通过将UI嵌入Office程序来向前移动,而不是相反。 VS通过其Office项目模板得到了很好的支持。有一些第三方产品支持在您自己的程序中嵌入文字处理器或电子表格。

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.

这篇关于如何以Win形式嵌入Microsoft Office?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆