aspose.diagram
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
functionisSigned()
           Indicates whether VBAcode is signed or not.
functiongetModules()
           Gets all VbaModule objects.
functiongetName()
functionsetName(value)
           Gets and sets the name of the VBA project.
functiongetReferences()
           Gets all references of VBA project.
 

Property Getters/Setters Detail

getName/setName : String 

function getName() / function setName(value)
Gets and sets the name of the VBA project.

isSigned : boolean 

function isSigned()
Indicates whether VBAcode is signed or not.

getModules : VbaModuleCollection 

function getModules()
Gets all VbaModule objects.

getReferences : VbaProjectReferenceCollection 

function getReferences()
Gets all references of VBA project.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.