通过自动化捕获错误

通过自动化捕获错误

本文介绍了通过自动化捕获错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法捕获另一个通过自动化控制

的应用程序中生成的错误?我有一个Access 2000应用程序打开Word 2000并继续

打开一系列文档,并在每个文档中解析内容和

将其写入Access表(打开Word后,Access应用程序在Word中运行一个

宏,通过DAO解析并写入Access应用程序。)


偶尔我们得到一个来自Word的错误(例如文档被锁定以进行
编辑或其他),这会挂起进程。这个过程是一夜之间

一个,所以,显然,如果它是从Word错误消息中挂起的。


是否有办法捕获这些生成的错误消息通过Word然后将
移到下一个文件上?


谢谢,


Neil

Is there a way to trap an error generated in another app that is controlled
via automation? I have an Access 2000 app that opens Word 2000 and proceeds
to open a series of documents and, in each document, parse the contents and
write it to an Access table (the Access app, after opening Word, runs a
macro within Word which parses and writes to the Access app via DAO).

Occasionally we get an error from Word (such as "document is locked for
editing" or other), which hangs the process. The process is an overnight
one, so, obviously, if it hangs from a Word error message.

Is there a way to trap these error messages generated by Word and just move
onto the next document?

Thanks,

Neil

推荐答案









这篇关于通过自动化捕获错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 09:04