[python-win32] MS Word and Python - how to disable SaveAs event?

Tim Roberts timr at probo.com
Fri Dec 14 18:39:22 CET 2007


Wojtek P wrote:
>
> I try use Microsoft Word and OpenOffice with Python - and i have some
> problems. How to disable "Save As" in word from python code, or how to
> cancel this function when user use it? This code below doesn't work :/

You can't.  This is not a Python issue.  Word simply does expose any
mechanism to disable specific menu items.

Why would you want to?  Are you thinking of this as a way to "protect" a
document?  If so, you are misguided.  If you need a way to display
documents in a read-only manner, then you need to do the display
yourself, without using Word.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.




More information about the python-win32 mailing list