This example displays a list of macros in the session document.
Sub PrintMacroNames() Dim list() As String Dim MacroObject As Attachmate_Reflection_Objects_Emulation_IbmHosts.Macro 'Get the Macro object and the list of macro names Set MacroObject = ThisIbmTerminal.Macro list = MacroObject.GetMacroNames(MacroEnumerationOption_Document) 'Print the list If UBound(list) = -1 Then Exit Sub Else For i = 0 To UBound(list) Debug.Print list(i) Next i End If End Sub