Sub CreateRandomEllipses()
Dim shp As Shape Dim i As Integer
' Get the active document Dim doc As Document Set doc = ActiveDocument
' Get the selected objects (assuming you have objects selected) Dim selectedObjects As Shapes Set selectedObjects = doc.ActiveSelection.Shapes
' Loop through each selected object For Each shp In selectedObjects ' Generate a random number between 1 and 100 i = Int((100 - 1 + 1) * Rnd + 1)
' Create an ellipse shape with the same position and size as the selected object With doc.Shapes.AddShape(cdrEllipse, shp.Left, shp.Top, shp.Width, shp.Height)
' Set the fill gradient for the ellipse .Fill.Gradient.Type = i ' Adjusted property for CorelDRAW
End With Next shp
End Sub
......................
I do not know nothing about script at the very firstset. I got this script using the AI with much eager and happy i pasted and not working. can someone help to
run this and achieve the results.