O'Reilly logo

Writing Word Macros, Second Edition by Steven Roman PhD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Password-Related Properties

The Document object has several properties related to document passwords:

HasPassword property

This read-only property returns True if a password is required to open the specified document.

Password property

Sets a password (as a string) that must be supplied to open the document. This an example of a relatively rare write-only property. In other words, you can write the password, but not read it!

The WritePassword property

Sets a password for modifying the document (that is, writing to the document, hence the name). It is also a write-only string. Note that a document can still be opened without knowing this password.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required