Workbook instances loaded from encrypted files or streams will cache the password used to decrypt the document and reuse it on subsequent saves. Therefore, HasOpenPassword will initially be true for Workbooks loaded from encrypted files or streams and false for all other Workbooks.
The open password can be cleared or reset by using SetOpenPassword.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2