检查 VBA 代码是否已签名
Contents
[
Hide
]
Aspose.Diagram 允许用户检查 VBA 代码项目是否已签名。请使用 [Diagram.VbaProject.IsSigned] 属性检查 VBA 代码项目是否已签名。
以下代码说明了如何使用 [Diagram.VbaProject.IsSigned] 属性检查 VBA 代码是否已签名。您可以使用任何 visio 文件来测试此代码。出于测试目的,您可以使用代码中使用的这个 visio 文件.
示例代码
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); |
控制台输出
下面是使用上述代码的控制台输出样本 visio 文件由链接提供。
Is VBA Code Project Signed: False