need to understand this and make rest move
I need to understand this code which help to touch the guidelines to the right side also want to learn the other move which helps to touch the rest sides of the shape
Sub TouchRight()
Dim SR As ShapeRange
Dim G As Shape
Dim X As Double
Dim Position
Set SR = ActiveSelectionRange
ActiveDocument.Unit = cdrMillimeter
Position = ActiveDocument.MasterPage.GuidesLayer.Shapes.All.RightX
If ActiveDocument.MasterPage.GuidesLayer.Shapes.Count > 0 Then
For Each G In ActiveDocument.MasterPage.GuidesLayer.Shapes
If G.CenterX > ActiveSelectionRange.RightX Then
If G.CenterX < Position Then
Position = G.CenterX
End If
End If
Next G
End If
SR.SetSizeEx SR.LeftX, SR.CenterY, Position - SR.LeftX, SR.SizeHeight
End Sub