VbaProject
VbaProject class
Represents the VBA project.
Properties
| Name | Type | Description |
|---|---|---|
| IsValidSigned | boolean | Indicates whether the signature of VBA project is valid or not. |
| CertRawData | byte[] | Gets certificate raw data if this VBA project is signed. |
| Encoding | Encoding | Gets and sets the encoding of VBA project. |
| Name | String | Gets and sets the name of the VBA project. |
| IsSigned | boolean | Indicates whether VBAcode is signed or not. |
| IsProtected | boolean | Indicates whether this VBA project is protected. |
| IslockedForViewing | boolean | Indicates whether this VBA project is locked for viewing. |
| Modules | VbaModuleCollection | Gets all VbaModule objects. |
| References | VbaProjectReferenceCollection | Gets all references of VBA project. |
Methods
| Name | Description |
|---|---|
| sign | Sign this VBA project by a DigitalSignature |
| protect | Protects or unprotects this VBA project. |
If islockedForViewing is true, the password could not be null. | | copy | Copy VBA project from other file. | | validatePassword | Validates protection password. |
VbaProject.IsValidSigned property
Indicates whether the signature of VBA project is valid or not.
Type: boolean
VbaProject.CertRawData property
Gets certificate raw data if this VBA project is signed.
Type: byte[]
VbaProject.Encoding property
Gets and sets the encoding of VBA project.
Type: Encoding
VbaProject.Name property
Gets and sets the name of the VBA project.
Type: String
VbaProject.IsSigned property
Indicates whether VBAcode is signed or not.
Type: boolean
VbaProject.IsProtected property
Indicates whether this VBA project is protected.
Type: boolean
VbaProject.IslockedForViewing property
Indicates whether this VBA project is locked for viewing.
Type: boolean
VbaProject.Modules property
Gets all VbaModule objects.
Type: VbaModuleCollection
VbaProject.References property
Gets all references of VBA project.
Type: VbaProjectReferenceCollection
sign(digitalSignature)
Sign this VBA project by a DigitalSignature
| Parameter | Type | Description |
|---|---|---|
| digitalSignature | DigitalSignature | DigitalSignature |
protect(islockedForViewing, password)
Protects or unprotects this VBA project.
If islockedForViewing is true, the password could not be null.
| 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. |
copy(source)
Copy VBA project from other file.
| Parameter | Type | Description |
|---|---|---|
| source | VbaProject |
validatePassword(password)
Validates protection password.
| Parameter | Type | Description |
|---|---|---|
| password | String | the password |
Returns: Whether password is the protection password of this VBA project