VbaProject

VbaProject class

Represents the VBA project.

class VbaProject;

Methods

MethodDescription
isValidSigned()Indicates whether the signature of VBA project is valid or not.
getCertRawData()Gets certificate raw data if this VBA project is signed.
getEncoding()Gets and sets the encoding of VBA project.
setEncoding(EncodingType)Gets and sets the encoding of VBA project.
getName()Gets and sets the name of the VBA project.
setName(string)Gets and sets the name of the VBA project.
isSigned()Indicates whether VBAcode is signed or not.
isProtected()Indicates whether this VBA project is protected.
getIslockedForViewing()Indicates whether this VBA project is locked for viewing.
getModules()Gets all VbaModule objects.
getReferences()Gets all references of VBA project.
sign(DigitalSignature)Sign this VBA project by a DigitalSignature
protect(boolean, string)Protects or unprotects this VBA project.
copy(VbaProject)Copy VBA project from other file.
validatePassword(string)Validates protection password.
isNull()Checks whether the implementation object is null.

isValidSigned()

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

isValidSigned() : boolean;

getCertRawData()

Gets certificate raw data if this VBA project is signed.

getCertRawData() : number[];

Returns

number[]

getEncoding()

Gets and sets the encoding of VBA project.

getEncoding() : EncodingType;

Returns

EncodingType

setEncoding(EncodingType)

Gets and sets the encoding of VBA project.

setEncoding(value: EncodingType) : void;

Parameters:

ParameterTypeDescription
valueEncodingTypeThe value to set.

getName()

Gets and sets the name of the VBA project.

getName() : string;

setName(string)

Gets and sets the name of the VBA project.

setName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

isSigned()

Indicates whether VBAcode is signed or not.

isSigned() : boolean;

isProtected()

Indicates whether this VBA project is protected.

isProtected() : boolean;

getIslockedForViewing()

Indicates whether this VBA project is locked for viewing.

getIslockedForViewing() : boolean;

getModules()

Gets all VbaModule objects.

getModules() : VbaModuleCollection;

Returns

VbaModuleCollection

getReferences()

Gets all references of VBA project.

getReferences() : VbaProjectReferenceCollection;

Returns

VbaProjectReferenceCollection

sign(DigitalSignature)

Sign this VBA project by a DigitalSignature

sign(digitalSignature: DigitalSignature) : void;

Parameters:

ParameterTypeDescription
digitalSignatureDigitalSignatureDigitalSignature

protect(boolean, string)

Protects or unprotects this VBA project.

protect(islockedForViewing: boolean, password: string) : void;

Parameters:

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

Remarks

If islockedForViewing is true, the password could not be null.

copy(VbaProject)

Copy VBA project from other file.

copy(source: VbaProject) : void;

Parameters:

ParameterTypeDescription
sourceVbaProject

validatePassword(string)

Validates protection password.

validatePassword(password: string) : boolean;

Parameters:

ParameterTypeDescription
passwordstringthe password

Returns

Whether password is the protection password of this VBA project

isNull()

Checks whether the implementation object is null.

isNull() : boolean;