MD5

Returns the MD5 hash of the provided text as a hexadecimal string

MD5 (text[, encoding])

Attribute of the Plain Text type or string constant or calculation producing text, and optionally a string naming the character encoding to use (if not specified the default encoding is used)

Text: the MD5 hash of the text, as a hexadecimal string

IF MD5 (Document.Text) <> Document.Checksum THEN ...