MS Word查看器C#.NET自动化 [英] MS Word Viewer C# .NET automation

查看:169
本文介绍了MS Word查看器C#.NET自动化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能自动以下几点:
引用MS Word查看器以编程方式打开一个文档,然后打印呢?
C#理想

Is it possible to automate the following: referencing MS Word Viewer to open a document programatically and then print it? C# ideally

我猜测,如果有可能将其打开,然后更可能将有可能将其打印出来。

I'm guessing if it is possible to open it then more than likely it will be possible to print it.

我试图增加在Visual Studio COM对象的引用..微软Office 11/12的对象库,但微软Word库心不是上市?任何想法?

I've tried adding a reference to COM Object in Visual Studio .. MS Office 11 / 12 Object Library but MS Word Library isnt listed? Any ideas?

我没有安装Office 200X

I haven't got Office 200x installed

欢呼声

推荐答案

我们通过使用Word Interop程序集做了。这需要Word来安装(启动scenese后面WINWORD过程)和互操作可以让你在你的code与它进行交互。

We did it by using the Word Interop assembly. This requires Word to be installed (launches a WINWORD process behind the scenese) and the interop allows you to interact with it in your code.

据我所知,这是做到这一点的唯一方法。

As far as I know, that is the only way to do it.

这篇关于MS Word查看器C#.NET自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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