From fe7e9a5c6c57b3a3190bfe6fefb909622df5c542 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Mon, 7 Jan 2013 22:18:39 +0100 Subject: [PATCH] Improve Word document opening: open read-only and invisble, avoiding unnecessary dialogs. --- linkcheck/winutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linkcheck/winutil.py b/linkcheck/winutil.py index 03fdb580..d623bd32 100644 --- a/linkcheck/winutil.py +++ b/linkcheck/winutil.py @@ -84,7 +84,8 @@ def close_word_app (app): def open_wordfile (app, filename): """Open given Word file with application object.""" - return app.Documents.Open(filename) + return app.Documents.Open(filename, ReadOnly=True, + AddToRecentFiles=False, Visible=False, NoEncodingDialog=True) def close_wordfile (doc):