MS word自动化 - 更快打开 [英] MS word automation - faster opening

查看:52
本文介绍了MS word自动化 - 更快打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我想知道是否有人可以提供以下帮助:

我正在尝试打开受密码保护的MS Word(.doc)文件(是我兄弟写的浪漫,他最近去世了)。我创建了一个小程序,使用Microsoft.Office.Interop.Word测试各种字符组合(只需打开)。考虑到它必须做的开放尝试次数,问题是太慢(每秒17次开启尝试)。有没有办法让这个过程更快?我试图禁用MS Word补充和其他东西,但没有任何作用。我不能使用OpenXML,因为文件是.doc格式。

提前感谢任何帮助。

(用谷歌翻译帮助写的)



我尝试过:



Hello
I would like to know if someone can help with the following:
I am trying to open a MS Word (.doc) file protected by a password (is a romance written by my brother and he pass away recently). I created a small program to test various combinations of characters using Microsoft.Office.Interop.Word (Just to open). The problem is that is too slow (17 opening attempts per second) considering the number of opening attempts that it has to do. Is there any way to make the process faster? I have tried to disable MS Word supplements and other things but nothing works. I can´t use OpenXML because the file is in .doc format.
Thanks in advance any help.
(Written with google translator's help)

What I have tried:

Imports Microsoft.Office.Interop.Word

Dim missing As Object = System.Reflection.Missing.Value
Dim wordApp As Application = New Application()
Dim Doc As Document = Nothing
wordApp.Visible = False

'...

Try
	strSenha = New String(SenhaArray)

	Doc = wordApp.Documents.Open(clsParametros.FileName, missing, True, False, strSenha, missing, missing, missing, missing, missing, missing, _
								 missing, missing, missing, missing, missing)
	KeyFound = True
	WriteToLogFile("Senha Encontrada: " & strSenha)
	strStatusLabelMsg = "Senha Encontrada: " & strSenha
	_worker.ReportProgress(0, Arguments.NewArguments(TipoOperacao.UpDateStatusLabelMsg, strStatusLabelMsg, True))
	Doc.Close()
	Exit For
Catch ex As Exception
End Try

'...

推荐答案

没有办法让这个过程更快,当然也没办法让它变得足够快到暴力 - 强制每个可能的密码字符组合,不会花费数十年的时间来查找。
There is no way to make the process faster and certainly no way to make it fast enough to brute-force every possible password character combination that won't take you decades to find.


这篇关于MS word自动化 - 更快打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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