PLACE NUMBERS FROM 1 TO 99.......AT MOSE CLICK X, Y COORDINATES

Hello,
Please make a macro:

1. I write 7 and around the number circle as an example.
2. I select the sample, created in step 1
3. I run macro1 /must be created/ 
4. I click on page anywhere and at click point appears 8.
The printout should look like the example created in step 1 
5. I click on other place on same page or on other page and appear 9 
The printout should look like the example created in step 1


5.To stop macro I click on sample, created in step 1 or......one other action


Greetings!

Parents
No Data
Reply
  • To terminete macto just click out of page

    Sub From1To99()
    Dim s As Shape, s1 As Shape
    Dim i%, X As Double, Y As Double, pause%
    Dim Shift As Long, b As Boolean, SR_New As ShapeRange

    ActiveDocument.Unit = cdrMillimeter
    pause = 10

    b = False
    While Not b
    i = i + 1
    b = ActiveDocument.GetUserClick(X, Y, Shift, pause, False, cdrCursorSmallcrosshair)

    If X > ActivePage.LeftX And X < ActivePage.RightX Then
    If Y > ActivePage.BottomY And Y < ActivePage.TopY Then
    Set SR_New = New ShapeRange

    Set s = ActiveLayer.CreateEllipse2(X, Y, 10, 10)
    SR_New.Add s
    Set s1 = ActiveLayer.CreateArtisticText(X, Y, i) ', , , fntNm)
    SR_New.Add s1
    s1.CenterX = s.CenterX
    s1.CenterY = s.CenterY
    SR_New.Group

    ActiveDocument.ClearSelection
    Else
    b = True
    End If
    Else
    b = True
    End If
    If i = 99 Then b = True
    Wend
    End Sub

Children