如何用vba设置打印机?
如何用vba设置打印式样、纸张大小、打印范围(用窗口)等? '===================================<BR> '===================================<BR> '========如果有打印任务=============<BR> '===================================<BR> '===================================<BR> <BR> DoEvents<BR> If Check4.Value = 1 Then<BR> cadmessage.Label7.Caption = "正在设置打印机。。。。。。"<BR> '6,设置打印设备<BR> dwgfile.ActiveLayout.ConfigName = Combo2.Text<BR> '7,设置打印模式<BR> dwgfile.ActiveLayout.StyleSheet = Combo3.Text<BR> '1,图纸尺寸与单位<BR> dwgfile.ActiveLayout.CanonicalMediaName = Combo4.Text<BR> dwgfile.ActiveLayout.PaperUnits = acMillimeters<BR> '2,调整打印原点<BR> Dim BASEPIONT As Variant<BR> BASEPIONT = dwgfile.ActiveLayout.PlotOrigin<BR> dwgfile.ActiveLayout.CenterPlot = True<BR> <BR> '3,设置打印区域<BR> dwgfile.ActiveLayout.PlotType = acExtents<BR> '4,设置打印比例<BR> dwgfile.ActiveLayout.StandardScale = acScaleToFit<BR> <BR> '5,设置线宽比例<BR> dwgfile.ActiveLayout.ScaleLineweights = False '建议不要设置线宽缩放<BR> dwgfile.ActiveLayout.PlotRotation = ac90degrees<BR> '打印机已选择<BR> cadmessage.Label7.Caption = "正在打印。。。。。。"<BR> dwgfile.Plot.PlotToDevice<BR> '开始打印<BR> <BR> End If 我想知道如何设置打印范围(窗口选择)?
页:
[1]