asposediagram.api

Class VbaProject

Represents the VBA project.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");

diagram = new aspose.diagram.Diagram("Macro.vsdm");
// extract VBA project
v = diagram.getVbaProject();
// Iterate through the modules and modify VBA macro code
for (i = 0; i < diagram.getVbaProject().getModules().getCount(); i++) {
    module = diagram.getVbaProject().getModules().get(i);
    code = module.getCodes();
    if (code.indexOf("This is test message.") != -1) {
        code = code.replace("This is test message.", "This is Aspose.Diagram message.");
    }
    module.setCodes(code);
}
// save the Visio diagram
diagram.save("out-ModifyVBAModule.vssm", aspose.diagram.SaveFileFormat.VSSM);

Property Getters/Setters Summary
methodisSigned()
Indicates whether VBAcode is signed or not.
methodgetModules()
Gets all VbaModule objects.
methodgetName()
method
setName(value)
           Gets and sets the name of the VBA project.
methodgetReferences()
Gets all references of VBA project.