Check if VBA Code is Signed

The following code explains how to check if the VBA code is signed or not using the [Diagram.VbaProject.IsSigned] property. You can use any of your visio files to test this code. For testing purposes, you can use this visio file used in the code.

Sample Code

// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(Test.class);
// Load a diagram
Diagram diagram = new Diagram(dataDir + "1.vsdm");
//Check signed
boolean isSigned = diagram.getVbaProject().isSigned();
diagram.save(dataDir + "1out.vsdm", SaveFileFormat.VSDM);

Console Output

Below is the console output of the above code using the sample visio file provided by the link.

Is VBA Code Project Signed: False