VbaProject
VbaProject class
Represents the VBA project.
class VbaProject;
Methods
Method | Description |
---|---|
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
setEncoding(EncodingType)
Gets and sets the encoding of VBA project.
setEncoding(value: EncodingType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | EncodingType | The 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:
Parameter | Type | Description |
---|---|---|
value | string | The 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
getReferences()
Gets all references of VBA project.
getReferences() : VbaProjectReferenceCollection;
Returns
sign(DigitalSignature)
Sign this VBA project by a DigitalSignature
sign(digitalSignature: DigitalSignature) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
digitalSignature | DigitalSignature | DigitalSignature |
protect(boolean, string)
Protects or unprotects this VBA project.
protect(islockedForViewing: boolean, password: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
islockedForViewing | boolean | indicates whether locks project for viewing. |
password | string | If 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:
Parameter | Type | Description |
---|---|---|
source | VbaProject |
validatePassword(string)
Validates protection password.
validatePassword(password: string) : boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
password | string | the password |
Returns
Whether password is the protection password of this VBA project
isNull()
Checks whether the implementation object is null.
isNull() : boolean;