Check if VBA Code is Signed
Contents
[
Hide
]
Aspose.Diagram allows the user to check if the VBA code project is signed or not. Please use the [Diagram.VbaProject.IsSigned] property to check if the VBA code project is signed or not.
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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