Previous Document Next Document
PrintOptions.DownsampleGray

Property DownsampleGray As Boolean

Member of PrintOptions

The DownsampleGray property returns or sets the resolution of grayscale bitmaps for printing.

The following code example saves the current downsampling settings, changes the settings, and prints the document. The saved settings are then restored.

Sub Test() 
 Dim bDownSampleColor As Boolean 
 Dim bDownSampleGray As Boolean 
 Dim bDownSampleMono As Boolean 
 Dim DrawPrintOptions As PrintOptions 
 Set DrawPrintOptions = ActiveDocument.PrintSettings.Options 
 With DrawPrintOptions 
  'save the current setting 
  bDownSampleColor = .DownsampleColor 
  bDownSampleGray = .DownsampleGray 
  bDownSampleMono = .DownsampleMono 
  'change the setting 
  .DownsampleColor = True 
  .DownsampleGray = True 
  .DownsampleMono = False 
 End With 
 'print the document 
 ActiveDocument.PrintOut 
 'restore the downsample setting 
 With DrawPrintOptions 
  .DownsampleColor = bDownSampleColor 
  .DownsampleGray = bDownSampleGray 
  .DownsampleMono = bDownSampleMono 
 End With 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.