[python-win32] Excel / Word: setting properties
Tim Roberts
timr at probo.com
Wed Feb 28 12:20:03 EST 2018
Niemann, Hartmut wrote:
>
>
>
> I create an excel document using the COM interface.
>
>
>
> Now I need to set two properties to be compatible with a new company rule:
>
>
>
> “[the tool] uses MS Office standard (‘Keyword’) and custom (‘Document
> Confidentiality’) properties. so if your code is able
>
> to preset values to these properties [everything should work]”
>
>
>
> How do I set the [Excel workbook] standard property “Keywords” to
> “C_Restricted” and the user property “Document Confidentiality” to
> “Restricted”?
>
The Document object should have a BuiltinDocumentProperties collection
and a CustomDocumentProperties collection that you can query and
manipulate. You'll have to discover whether the properties you need to
tweak are builtin or not.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list