如何以编程方式关闭Microsoft Word对话框 [英] How to programatically close Microsoft Word dialog boxes

查看:109
本文介绍了如何以编程方式关闭Microsoft Word对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中使用带有.Net 4.0的C#和Process类,使用命令行选项从命令启动Microsoft Word 2010。 Word偶尔会死,重新启动时会显示需要关闭的对话框。我想自动化
关闭对话框,我正在寻找想法。



我可以使用Microsoft.Office.Interop.Word或Microsoft.Office.Tools.Word使用命令行选项启动Word并检查并回复对话框吗? div class ="h2_lin">解决方案

远行Microsoft.Office.Interop.Word并使用其dialog.display方法。



更多信息如下:




http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.dialog。显示(v = office.11​​)的.aspx


I'm using C# with .Net 4.0 in Visual Studio 2010 and the Process class to kick off Microsoft Word 2010 from the command with command line options. Occasionally Word dies and when restarted displays dialog boxes that need to be closed. I would like to automate closing the dialog boxes and am looking for ideas.

Can I use Microsoft.Office.Interop.Word or Microsoft.Office.Tools.Word to start Word with command line options and check and respond to dialog boxes?

解决方案

Go far Microsoft.Office.Interop.Word and use its dialog.display method.

For more info find below:


http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.dialog.display(v=office.11).aspx


这篇关于如何以编程方式关闭Microsoft Word对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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