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: 4.9.1.1

Syntax

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

Parameters

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

Return Value

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

See Also