C
Christian Lehmann
Hello,
I´m trying to unprotect a word document with python for reading all form fields.
But it doesn´t work.
Here´s a simple code sample:
wordapp = win32com.client.Dispatch("Word.Application")
docfile = wordapp.Documents.Open(file)
protecttype = docfile.ProtectionType # protected delivers 2
docfile.Unprotect
protecttype = docfile.ProtectionType # anyway 2
# do some work
docfile.Protect
protecttype = docfile.ProtectionType # anyway 2
So someone please tell me, whats my fault?
best regards
Christian
I´m trying to unprotect a word document with python for reading all form fields.
But it doesn´t work.
Here´s a simple code sample:
wordapp = win32com.client.Dispatch("Word.Application")
docfile = wordapp.Documents.Open(file)
protecttype = docfile.ProtectionType # protected delivers 2
docfile.Unprotect
protecttype = docfile.ProtectionType # anyway 2
# do some work
docfile.Protect
protecttype = docfile.ProtectionType # anyway 2
So someone please tell me, whats my fault?
best regards
Christian