Sub cross_lines()
ActiveDocument.Unit = cdrMillimeter
Dim sr As ShapeRange, shl As Shape
Set sr = ActiveSelectionRange
For Each shl In sr
If Not shl.Outline.Type = cdrNoOutline Then
shl.Outline.ConvertToObject
End If
Next
sr.BreakApart
'perevodim v obekty
Dim OrigSelection As ShapeRange
Dim OrigSelection1 As ShapeRange
Dim OrigSelection2 As ShapeRange
Set OrigSelection = ActiveSelectionRange
Set OrigSelection2 = New ShapeRange
Dim eff1 As Effect
For i = 1 To OrigSelection.Count
Set eff1 = OrigSelection(i).CreateContour(1, 0.1, 1, 0, , , , 0, 0, 2, 4, 15#)
Set OrigSelection1 = OrigSelection(i).Effects.ContourEffect.Separate
OrigSelection2.Add OrigSelection1(1)
Next i
Dim s1 As Shape
Dim s2 As Shape
Dim s3 As Shape
For sh = 1 To OrigSelection2.Count
Set s1 = OrigSelection2(sh)
For i = sh + 1 To OrigSelection2.Count
Set s2 = OrigSelection2(i)
If s1.DisplayCurve.IntersectsWith(s2.DisplayCurve) Then
n = n + 1
Set s3 = s1.Intersect(s2, True, True)
s3.Fill.ApplyUniformFill CreateCMYKColor(0, 100, 100, 0)
End If
Next i
Next sh
For Each sh In OrigSelection2
OrigSelection2.Delete
Next sh
MsgBox "0" & n & " " & перекрытий найдено"
End Sub