Visual Studio 2010 WordDocument [英] Visual Studio 2010 WordDocument

查看:111
本文介绍了Visual Studio 2010 WordDocument的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我是这个论坛的新人。

有些日子我在WordDocument项目类型上发疯了VisualStudio 2010 C#(终极版)。



我需要在没有Word菜单栏的情况下显示Word文档。我想让条形图不可见或禁用,但没有
成功,我总是得到同样的错误。




我尝试了以下命令:



Application.CommandBars.ActiveMenuBar.Visible = false;



但我得到以下异常:"通过调用COM组件返回了HRESULT E_FAIL"



我该怎么办?

任何人都可以帮助我吗?



提前致谢

Paola

Hello everyone,

I'm new on this forum.
For some days I'm going crazy on a WordDocument project type with VisualStudio 2010 C # (Ultimate version).

I need to display a Word document without the menu bar of Word. I thought of making the bar invisible or disabled, but without success, I always get the same error.

I tried the following command:

Application.CommandBars.ActiveMenuBar.Visible = false;

but I get the following exception: "HRESULT E_FAIL has been returned by a call to a COM component"

What should I do?
Can anyone help me?

Thanks in advance
Paola

推荐答案

当您说'菜单栏'时,您的意思是右键菜单吗?或者,功能区(顶部带有"主页"选项卡的顶部等)?您使用的是哪个版本的Word?

When you say 'menu bar', do you mean the right click menu? Or, the ribbon (the bar across the top with 'home' tab etc)? What version of Word are you using?


这篇关于Visual Studio 2010 WordDocument的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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