Version

FileWriteProtectedBy Property

Gets the name of the user who initially added file write protection to the document.
Syntax
'Declaration
 
Public ReadOnly Property FileWriteProtectedBy As String
public string FileWriteProtectedBy {get;}
Remarks

This value is valid if HasFileWriteProtectionPassword or IsFileWriteProtected is true. It will be updated when SetFileWriteProtectionPassword is called and a user name is specified with a new password.

Note: The Workbook and its related sub-objects do not prevent modifications at runtime when a file is write protected, as Microsoft Excel allows UI modifications to write protected files which are not unlocked with the proper password. In addition, write protected Workbook instances do not prevent saves to the file location from which they were loaded, as it is possible to overwrite files in this situation in Microsoft Excel via the 'Save As' dialog. It is the responsibility of the Workbook's consumer to prevent automatic file overwrites when IsFileWriteProtected is true.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, 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

See Also