Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Visual BasicFor Applications(VBA)forMicrosoft Word是一种简单但功能强大的编程语言,可用于扩展功能。 Aspose.WordsAPI提供了三个类来访问VBA项目源代码:
Aspose.WordsAPI提供Document.VbaProject属性以获取或设置文档中的VbaProject。
下面的代码示例演示如何创建VBA项目和VBA模块以及基本属性,例如Name和Type:
Aspose.Words还为用户提供了读取VBA宏的能力。
下面的代码示例演示如何从文档中读取VBA宏:
使用Aspose.Words,用户可以修改VBA宏。
下面的代码示例演示如何使用SourceCode属性修改VBA宏:
使用Aspose.Words也可以克隆VBA项目。
下面的代码示例演示如何使用创建现有项目副本的Clone属性克隆VBA项目:
如果需要,您还可以克隆VBA模块。
下面的代码示例演示如何使用创建现有项目副本的Clone属性克隆VBA模块:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.