The following VBA example creates a new document containing three shapes and prints the document to a file.
Sub Test()
Dim doc As Document
Dim s As Shape
Set doc = CreateDocument
Set s = ActiveLayer.CreateRectangle(1.114882, 10.078268, 3.030787, 8.485827, 0, 0, 0, 0)
Set s = ActiveLayer.CreateEllipse(4.075827, 7.540315, 6.016614, 5.375591, 90#, 90#, False)
Set s = ActiveLayer.CreatePolygon(5.842445, 2.912283, 7.758343, 0.44898, 5, 1, 1, False, 50, 100)
With doc
With .PrintSettings
.PrintToFile = True
.ForMac = False
.FileMode = prnSingleFile
.FileName = "C:\Temp.prn"
End With
.PrintOut
End With
End Sub