Sub Macro1() Dim n As Node, x1 As Double, y1 As Double, x2 As Double, y2 As Double, os As ShapeRange ActiveDocument.Unit = cdrMillimeter Set os = ActiveSelectionRange If os.Count <> 1 Then MsgBox ("Select one shape and run macro again!"): Exit Sub ActiveShape.Curve.Nodes.First.GetPosition x1, y1 ActiveShape.Curve.Nodes.Last.GetPosition x2, y2 If x2 <> x1 Then k = -1 Else myangle = -90: GoTo here: With os(1) .RotationCenterX = x1 .RotationCenterY = y1 End With myangle = Atn((y2 - y1) / (x2 - x1)) * 180 / 3.14159265358979here: os(1).Rotate k * myangleEnd Sub
Awesome thanks. Sending a pm
Hello. Is there a possibility to modify this code so that it can function on 2 marked nodes also in closed shapes?
Thx