Object Model Reference : Classes : P : PrintOptions : Properties : PrintOptions.DownsampleGray |
Property DownsampleGray As Boolean
Member of PrintOptions
The DownsampleGray property returns or specifies the printing resolution of grayscale bitmaps.
The following VBA 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 |
Copyright 2013 Corel Corporation. All rights reserved.