Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
For Each S In OrigSelection
' Recorded 20.05.2022
' Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Dim lr1 As Layer
Set lr1 = ActivePage.CreateLayer("Слой 2")
Dim lr2 As Layer
Set lr2 = ActivePage.CreateLayer("Слой 3")
Dim lr3 As Layer
Set lr3 = ActivePage.CreateLayer("Слой 4")
Dim lr4 As Layer
Set lr4 = ActivePage.CreateLayer("Слой 5")
Dim lr5 As Layer
Set lr5 = ActivePage.CreateLayer("Слой 6")
Dim lr6 As Layer
Set lr6 = ActivePage.CreateLayer("Слой 7")
Dim lr7 As Layer
Set lr7 = ActivePage.CreateLayer("Слой 8")
Dim eff1 As Effect
Set eff1 = S.CreateContour(0, 2.362205, 1, 0, CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#)
eff1.Contour.ContourGroup.AddToSelection
ActiveSelection.Separate
ActivePage.Layers("Слой 1").Activate
ActiveLayer.Shapes(1).MoveToLayer lr1
lr1.Shapes.All.CreateSelection
ActiveSelection.OrderToFront
Dim eff2 As Effect
Set eff2 = S.CreateContour(0, 2.480315, 1, 0, CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#)
ActiveDocument.CreateSelection eff2.Contour.ContourGroup, OrigSelection
ActiveSelection.Separate
ActiveLayer.Shapes(1).MoveToLayer lr2
lr2.Shapes.All.CreateSelection
ActiveSelection.OrderToFront
Dim eff3 As Effect
Set eff3 = S.CreateContour(0, 3.110236, 1, 0, CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#)
ActiveDocument.CreateSelection eff3.Contour.ContourGroup, OrigSelection
ActiveSelection.Separate
ActiveLayer.Shapes(1).MoveToLayer lr3
lr3.Shapes.All.CreateSelection
ActiveSelection.OrderToFront
Dim eff4 As Effect
Set eff4 = S.CreateContour(0, 3.543307, 1, 0, CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#)
ActiveDocument.CreateSelection eff4.Contour.ContourGroup, OrigSelection
ActiveSelection.Separate
ActiveLayer.Shapes(1).MoveToLayer lr4
lr4.Shapes.All.CreateSelection
ActiveSelection.OrderToFront
Dim eff5 As Effect
Set eff5 = S.CreateContour(1, 0.23622, 1, 0, CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#)
ActiveDocument.CreateSelection eff5.Contour.ContourGroup, OrigSelection
ActiveSelection.Separate
ActiveLayer.Shapes(2).MoveToLayer ActivePage.Layers("Слой 6")
ActivePage.Layers("Слой 6").Shapes.All.CreateSelection
ActiveSelection.OrderToFront
Dim eff6 As Effect
Set eff6 = S.CreateContour(1, 0.238189, 1, 0, CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#)
ActiveDocument.CreateSelection eff6.Contour.ContourGroup, OrigSelection
ActiveSelection.Separate
ActiveLayer.Shapes(2).MoveToLayer ActivePage.Layers("Слой 7")
ActivePage.Layers("Слой 7").Shapes.All.CreateSelection
ActiveSelection.OrderToFront
ActiveLayer.Shapes.All.CreateSelection
ActiveSelection.MoveToLayer ActivePage.Layers("Слой 8")
ActiveSelection.OrderToFront
' Recorded 20.05.2022
' Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Next S