Detects if a given MS Office document is protected by a password or not. Supported formats: Word, Excel and PowerPoint (both legacy and OpenXml).

Namespace:  SautinSoft
Assembly:  UseOffice (in UseOffice.dll) Version:


 C#  Visual Basic 
public bool IsPasswordProtected(
	byte[] fileBytes
Public Function IsPasswordProtected ( _
	fileBytes As Byte() _
) As Boolean


array< Byte >[]()[]
MS Office document as a byte array.

Return Value

True if document is protected by a password, false otherwise.

See Also