オペレーション スタックの取得

Sub GetOperationStacks()
    Dim i As Long
    
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
    
    Dim pOperationStack As IOperationStack
    Set pOperationStack = pMxDocument.OperationStack
    
    Dim pOperation As IOperation
    
    For i = 0 To pOperationStack.Count - 1
        Set pOperation = pOperationStack.Item(i)
        Debug.Print pOperation.MenuString
    Next i
End Sub