InfoConnect for Unisys
Attachmate.Reflection.Emulation.Common Namespace / Macro Class / GetMacroNames Method
The location from which to get a list of macro names. MacroEnumerationOption.Document gets the list from this session document's VBA project. MacroEnumerationOption.CommonProject gets the list from the Common VBA project.
Example


In This Topic
    GetMacroNames Method (Macro)
    In This Topic
    Gets a list of existing macro names.
    Syntax
    'Declaration
     
    
    Public Function GetMacroNames( _
       ByVal macroSource As MacroEnumerationOption _
    ) As String()
    'Usage
     
    
    Dim instance As Macro
    Dim macroSource As MacroEnumerationOption
    Dim value() As String
     
    value = instance.GetMacroNames(macroSource)
    public string[] GetMacroNames( 
       MacroEnumerationOption macroSource
    )

    Parameters

    macroSource
    The location from which to get a list of macro names. MacroEnumerationOption.Document gets the list from this session document's VBA project. MacroEnumerationOption.CommonProject gets the list from the Common VBA project.

    Return Value

    A set of macro names. The set may be empty if there are no existing macros.
    Example
    class Program
    {
      private Macro mac;
      private string[] macroNames;
         
      public string[] StopRecording()
      {
        macroNames = mac.GetMacroNames(MacroEnumerationOption.CommonProject); 
        return macroNames;
      }
    }
    See Also