执行Microsoft.Office.Interop.Word.Document()时出错 [英] Error while executing Microsoft.Office.Interop.Word.Document()

查看:379
本文介绍了执行Microsoft.Office.Interop.Word.Document()时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

收到错误:

am getting error :

Creating an instance of the COM component with CLSID {00020906-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)).





我得到这行代码





I get at this line of code

private void btnMailmerge_Click(object sender, RoutedEventArgs e)
        {
            var application = new Microsoft.Office.Interop.Word.Application();
            var document = new Microsoft.Office.Interop.Word.Document();//at this line am getting above error.





我无法理解为了解决这个问题需要做些什么以及如何解决这个问题。

可以解决任何一个问题。如何解决这个问题。 />


提前致谢。



I could not understand what made to get this exception and what 've to do to solve it.
can any one suugestion how can i solve this issue.

Thanks in advance.

推荐答案

private void btnMailmerge_Click(object sender, RoutedEventArgs e)
        {
            var application = new Microsoft.Office.Interop.Word.Application();
            var document = application.Documents.Add();
        }


这篇关于执行Microsoft.Office.Interop.Word.Document()时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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