ParagGoyal-9329 avatar image
0 Votes"
ParagGoyal-9329 asked JackJJun-MSFT commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ParagGoyal-9329, Could you tell me what is your current app, winform or other apps? What references you add for your app? Also, Please tell me what do you want to get in the final. It will be better for me to analyze your problem.

0 Votes 0 ·

0 Answers