Improve Word document opening: open read-only and invisble, avoiding unnecessary dialogs.

This commit is contained in:
Bastian Kleineidam 2013-01-07 22:18:39 +01:00
parent a5b6136e70
commit fe7e9a5c6c

View file

@ -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):