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(
	Stream stream
)
Public Function IsPasswordProtected ( _
	stream As Stream _
) As Boolean

Parameters

stream
Stream
MS Office document stream.

Return Value

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

See Also