从WinForm捕获.NET 4中的文档关闭事件 [英] Capturing Document Close Event in .NET 4 from WinForm

查看:53
本文介绍了从WinForm捕获.NET 4中的文档关闭事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生们。

是否可以从WinForm应用程序中捕获.NET 4中的Word文档关闭事件。

Is it Possible to to Capture Word Document Close Event in .NET 4 from the WinForm App.

事件在.net 2.0中可用,而不是(内部)。它是否有任何经验证的方式来捕获文件结束事件?

Event was available in .net 2.0, not it is (internal). It any validated way to capture document close event ?

提前谢谢。 

Thank you in advance. 

Irakli Lomidze

Irakli Lomidze

推荐答案

你好
Irakli Lomidze,

您可以从Word VBA或VSTO Word文档或VSTO Word Addin中捕获Word文档事件。

you can capture the Word document events from Word VBA or VSTO Word Document or from VSTO Word Addin.

捕获您需要在Word应用程序环境中的事件。

to capture the Event you need to be in a environment of Word Application.

因此,如果您有一个单独的Windows应用程序,您希望在Word文档中捕获该事件,那么它将不起作用,您将无法捕获它。

so if you have a separate Windows Application from where you want to capture the event in Word document then it will not going to work and you will not be able to capture it.

您可以尝试检查是否可以创建VSTO Word文档或Addin,然后您可以尝试在其中创建Windows窗体。

further you can try to check if you are available to create VSTO Word Document or Addin then you can try to create a Windows Form in that.

by这样你也可以使用Windows Form的功能。

by this way you can also use the functionality of Windows Form.

这是可能的你需要改变一点逻辑来满足你的要求。

it is possible that you need to change the logic little bit to fulfil your requirement.

你可以告诉我们,从windows窗体中捕获事件后你想要做什么。

you can let us know , what you want to do after capturing the event from windows form.

我们可以尝试为您提供一些解决问题的建议。

we can try to provide you some suggestions to solve the issue.

问候

Deepak


这篇关于从WinForm捕获.NET 4中的文档关闭事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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