Click or drag to resize

UseOfficeIsPasswordProtected Method (Byte)

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: 2023.11.14
Syntax
public bool IsPasswordProtected(
	byte[] fileBytes
)

Parameters

fileBytes
Type: SystemByte
MS Office document as a byte array.

Return Value

Type: Boolean
True if document is protected by a password, false otherwise.
See Also