Previous Document Next Document

Object Model Reference : Classes : P : PrintSettings : Properties : PrintSettings.FileName


PrintSettings.FileName

Property FileName As String

Description

Member of PrintSettings

The FileName property returns or specifies the filename when printing to file.

VBA example

The following VBA example creates a new document containing three shapes and then prints the document to 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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.