API Documentation > CorelDRAW > 2025-v26 > PrintSettings > IPrnVBAPrintSettings
PrintSettings.FileName property
Specifies the destination file name to save the print job to
Syntax:
Property Get FileName() As String
Property Let FileName(ByVal Value As String)
Remarks:
The FileName property returns or specifies the filename when printing to a file.
Examples:
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