Back to Devexpress

VbaProject.Modules Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-vbaproject.md

latest3.8 KB
Original Source

VbaProject.Modules Property

Obtains modules of the VBA project.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
VbaModuleCollection Modules { get; }
vb
ReadOnly Property Modules As VbaModuleCollection

Property Value

TypeDescription
VbaModuleCollection

The collection of VBA project modules.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Modules property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/VbaMacrosActions.cs#L19

csharp
{
    foreach (VbaModule module in document.VbaProject.Modules)
    { document.AppendText("\r\n \u00B7 " + module.Name); }

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/VbaMacros.cs#L14

csharp
{
    foreach (VbaModule module in document.VbaProject.Modules)
    { document.AppendText("\r\n \u00B7 " + module.Name); }

word-document-api-examples/CS/CodeExamples/VbaMacrosActions.cs#L19

csharp
if (document.VbaProject.Modules.Count > 0)
    foreach (VbaModule module in document.VbaProject.Modules)
    { document.AppendText("\r\n \u00B7 " + module.Name); }

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/VbaMacros.vb#L12

vb
If document.VbaProject.Modules.Count > 0 Then
    For Each [module] As DevExpress.XtraRichEdit.API.Native.VbaModule In document.VbaProject.Modules
        document.AppendText(Global.Microsoft.VisualBasic.Constants.vbCrLf & " · " & [module].Name)

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/VbaMacros.vb#L12

vb
If document.VbaProject.Modules.Count > 0 Then
    For Each [module] As DevExpress.XtraRichEdit.API.Native.VbaModule In document.VbaProject.Modules
        document.AppendText(Global.Microsoft.VisualBasic.Constants.vbCrLf & " · " & [module].Name)

See Also

VbaProject Interface

VbaProject Members

DevExpress.XtraRichEdit.API.Native Namespace