VbaProject

VbaProject class

Represents the VBA project.

Methods

NameDescription
copy(source)Copy VBA project from other file.
getCertRawData()Gets certificate raw data if this VBA project is signed.
getEncoding()Gets and sets the encoding of VBA project.
getIslockedForViewing()Indicates whether this VBA project is locked for viewing.
getModules()Gets all VbaModule objects.
getName()Gets and sets the name of the VBA project.
getReferences()Gets all references of VBA project.
isProtected()Indicates whether this VBA project is protected.
isSigned()Indicates whether VBAcode is signed or not.
isValidSigned()Indicates whether the signature of VBA project is valid or not.
protect(islockedForViewing, password)Protects or unprotects this VBA project. If islockedForViewing is true, the password could not be null.
setEncoding()Gets and sets the encoding of VBA project.
setName()Gets and sets the name of the VBA project.
sign(digitalSignature)Sign this VBA project by a DigitalSignature
validatePassword(password)Validates protection password.

copy(source)

Copy VBA project from other file.

ParameterTypeDescription
sourceVbaProject

getCertRawData()

Gets certificate raw data if this VBA project is signed.

getEncoding()

Gets and sets the encoding of VBA project.

getIslockedForViewing()

Indicates whether this VBA project is locked for viewing.

getModules()

Gets all VbaModule objects.

getName()

Gets and sets the name of the VBA project.

getReferences()

Gets all references of VBA project.

isProtected()

Indicates whether this VBA project is protected.

isSigned()

Indicates whether VBAcode is signed or not.

isValidSigned()

Indicates whether the signature of VBA project is valid or not.

protect(islockedForViewing, password)

Protects or unprotects this VBA project. If islockedForViewing is true, the password could not be null.

ParameterTypeDescription
islockedForViewingbooleanindicates whether locks project for viewing.
passwordStringIf the value is null, unprotects this VBA project, otherwise projects the this VBA project.

setEncoding()

Gets and sets the encoding of VBA project.

setName()

Gets and sets the name of the VBA project.

sign(digitalSignature)

Sign this VBA project by a DigitalSignature

ParameterTypeDescription
digitalSignatureDigitalSignatureDigitalSignature

validatePassword(password)

Validates protection password.

ParameterTypeDescription
passwordStringthe password

Returns: boolean — boolean Whether password is the protection password of this VBA project