Sub d_ConvertOutline()
Dim origSel As ShapeRange, myAlign As New ShapeRange
Dim ss As Shape, s As New Shape, sss As New Shape, sssT As New Shape
Set origSel = ActiveSelectionRange
ActiveDocument.BeginCommandGroup "d_ConvertOutline"
Optimization = True
EventsEnabled = False
ActiveDocument.SaveSettings
ActiveDocument.PreserveSelection = False
For Each ss In origSel.Shapes
If Not ss.Outline Is Nothing Then
If ss.Outline.Width > 0.019 And ss.Outline.Width < 0.029 Then
Set sssT = ss.Duplicate
Set sss = sssT.Outline.ConvertToObject
sssT.Delete
ss.Outline.ScaleWithShape = True
ss.SizeHeight = ss.SizeHeight * 10
ss.SizeWidth = ss.SizeWidth * 10
Set s = ss.Outline.ConvertToObject
ss.Delete
s.SizeHeight = s.SizeHeight * 0.1
s.SizeWidth = s.SizeWidth * 0.1
s.AlignToShape cdrAlignHCenter, sss
s.AlignToShape cdrAlignVCenter, sss
sss.Delete
Else
ss.Outline.ConvertToObject
End If
End If
Next ss
ActiveDocument.PreserveSelection = True
ActiveDocument.RestoreSettings
EventsEnabled = True
Optimization = False
Application.CorelScript.RedrawScreen
ActiveDocument.EndCommandGroup
End Sub