将单词嵌入vb.net [英] embed word into vb.net

查看:107
本文介绍了将单词嵌入vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在vb.net中嵌入Microsoft word?我希望在vb.net本身中打开文件,也可以进行修改.
thnx

how can i embed Microsoft word in vb.net? i want the file to open in vb.net itself and modifications can be done also.
thnx

推荐答案

否. Microsoft希望您使用Word.我相信,SyncFusion有一些可以购买的控件来执行此操作,但Word本身不提供此功能.您可以编写VB.NET代码来读取和编写Word文档,但不能显示编辑器.
No. Microsoft wants you to use Word. SyncFusion has some controls you can buy to do this, I believe, but Word itself does not offer this. You can write VB.NET code to read and write Word docs, but not to show an editor.


正如Christian所说,Word并非旨在嵌入到应用程序中.

一种远程的可能性是,在单独的进程中运行Word,将其Windows变成对应用程序进行某些控制的子窗口,然后使用Office自动化对其进行控制.此解决方案将取决于Word的安装,并且在实现上会非常丑陋和尴尬,以至于我不再讨论它.

您有更多机会将OpenOffice嵌入到Open Source中,并提供大致的Word功能(并且可以与所有格式的Word文档一起使用).请参阅此简短文章:

http://opendocument4all.com/content/view/22/39/ [ http://en.wikipedia.org/wiki/OpenOffice.org [ http://www.openoffice.org/ [ ^ ].



实际上,所有具有近字功能的选项都很难实现,以带来惨痛的收益.
甚至RichTextBox都有些尴尬.

这是丰富格式表示的最佳替代方法:HTML渲染器.此CodeProject工作仅针对System.Windows.Forms完成,非常完美:

您将使用的专业HTML渲染器 [ ^ ].

这不仅具有良好的可用性和HTML表达能力,而且还增加了许多功能,例如到嵌入式资源的链接(特殊的自定义URI模式),这对于嵌入式渲染器来说非常重要.

—SA
As Christian explained, Word is not designed to be embedded in application.

One remote possibility is to run Word in a separate process, make its windows a child windows of some control of your application and use Office automation to control it. This solution would depend on Word installation and would be so ugly and awkward in implementation that I don''t want to discuss it any longer.

You have much better chances to embed OpenOffice with is Open Source and offers roughly Word functionality (and can work with all format of Word document). Please see this short article:

http://opendocument4all.com/content/view/22/39/[^].

See also:
http://en.wikipedia.org/wiki/OpenOffice.org[^],
http://www.openoffice.org/[^].



All those options with near-Word capabilities are too hard to implement, for miserable benefits, in practice.
Even RichTextBox is more or less awkward.

This this is the best alternative for rich format presentation: a renderer of HTML. This CodeProject work is done just for System.Windows.Forms and it''s just perfect:

A Professional HTML Renderer You Will Use[^].

Not only this is good in usability and HTML expressive power, it add a lot of features such as links to embedded resources (special custom URI schema), which is very important for embedded renderer.

—SA


这篇关于将单词嵌入vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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