Open chat AI

https://chat.openai.com/chat

Write a module for coral draw the draws a box 100mm by 400mm

Here is a sample module for drawing a box with dimensions of 100mm by 400mm in CorelDRAW:

Sub DrawBox()

'Declare variables
Dim boxHeight As Double
Dim boxWidth As Double

'Set the height and width of the box
boxHeight = 100
boxWidth = 400

'Create a new document
Dim doc As Document
Set doc = Application.CreateDocument

'Activate the document
doc.Activate

'Turn off the snap to grid feature
Application.SnapToGrid = False

'Turn off the snap to guides feature
Application.SnapToGuides = False

'Turn off the snap to shapes feature
Application.SnapToShapes = False

'Turn off the snap to points feature
Application.SnapToPoints = False

'Turn off the snap to intersections feature
Application.SnapToIntersections = False

'Turn off the snap to smart guides feature
Application.SnapToSmartGuides = False

'Create a new rectangle
Dim rect As Shape
Set rect = doc.ActivePage.CreateRectangle(0, 0, boxWidth, boxHeight)

'Set the outline color to black
rect.Outline.Color.RGB = RGB(0, 0, 0)

'Set the outline width to 0.25mm
rect.Outline.Width = 0.25

'Set the fill color to white
rect.Fill.Color.RGB = RGB(255, 255, 255)

'Deselect the rectangle
rect.Deselect

End Sub
Parents Reply Children
No Data