office交流網--QQ交流群號

Access培訓群:792054000         Excel免費交流群群:686050929          Outlook交流群:221378704    

Word交流群:218156588             PPT交流群:324131555

access將報錶內容打印成綵色

2020-10-30 08:00:00
tmtony8
原創
2552

設計好的報錶 需要打印。一般來説打印機可以選擇黑白打印和綵色打印。

如何利用代碼指定打印機是以綵色還是黑白來打印輸齣。

DoCmd.OpenReport "報錶1", acViewPreview  
Reports("報錶2").Printer.ColorMode = acPRCMColor   '更改打印色綵模式爲綵色



下麵代碼指定的窗體設置各種打印機設置

Sub SetPrinter(strFormname As String) 
 
 DoCmd.OpenForm strFormname, acDesign, acFormEdit, acHidden 
 
 With Forms(form1).Printer 
 
 .TopMargin = 1440 
 .BottomMargin = 1440 
 .LeftMargin = 1440 
 .RightMargin = 1440 
 
 .ColumnSpacing = 360 
 .RowSpacing = 360 
 
  .ColorMode = acPRCMColor 
 .DataOnly = False 
 .DefaultSize = False 
 .ItemSizeHeight = 2880 
 .ItemSizeWidth = 2880 
 .ItemLayout = acPRVerticalColumnLayout 
 .ItemsAcross = 6 
 
 .Copies = 1 
 .Orientation = acPRORLandscape 
 .Duplex = acPRDPVertical 
 .PaperBin = acPRBNAuto 
 .PaperSize = acPRPSLetter 
 .PrintQuality = acPRPQMedium 
 
 End With 
 
 DoCmd.Close acForm, strFormname, acSaveYes 
 
 
End Sub

分享