Previous Document Next Document

Object Model Reference : Classes : P : PrintSettings : Methods : PrintSettings.Save


PrintSettings.Save

Function Save(FileName As String) As Boolean

Description

Member of PrintSettings

The Save method saves a print style.

Parameter
Description
FileName
Specifies the full path and filename of the file containing the print settings

VBA example

The following VBA example creates a new document containing four rectangles, each filled with a different uniform color. It then creates and saves a new print style. After reverting to the default print style, it prints the document. It then loads the saved print style and prints the document again.

Sub Test()
 Dim doc As Document
 Dim s As Shape
 Set doc = CreateDocument
 Set s = ActiveLayer.CreateRectangle(0.940709, 10.177795, 3.130315, 8.411181, 0, 0, 0, 0)
 s.Fill.UniformColor.CMYKAssign 0, 0, 0, 100
 s.Outline.Type = cdrNoOutline
 Set s = ActiveLayer.CreateRectangle(1.139764, 5.201417, 3.553307, 3.111339, 0, 0, 0, 0)
 s.Fill.UniformColor.CMYKAssign 0, 0, 100, 0
 s.Outline.Type = cdrNoOutline
 Set s = ActiveLayer.CreateRectangle(4.896929, 10.202677, 7.186063, 8.510709, 0, 0, 0, 0)
 s.Fill.UniformColor.CMYKAssign 0, 100, 0, 0
 s.Outline.Type = cdrNoOutline
 Set s = ActiveLayer.CreateRectangle(5.245276, 5.450236, 7.683701, 3.285512, 0, 0, 0, 0)
 s.Fill.UniformColor.CMYKAssign 100, 0, 0, 0
 s.Outline.Type = cdrNoOutline
 With doc
  With .PrintSettings
   .Separations.Enabled = True
   .Copies = 5
   .Save "c:\Seps.prs"
   .Reset
  End With
  .PrintOut
  With .PrintSettings
   .Load "c:\Seps.prs"
  End With
  .PrintOut
 End With
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.