明总求您帮忙看看,急!!!
<P>Public Sub Plot()</P><P> Dim point1(), point2()</P>
<P> ReDim Preserve point1(0 To 1)<BR> ReDim Preserve point2(0 To 1)</P>
<P> point1(0) = 0: point1(1) = 0<BR> <BR> point2(0) = 420: point2(1) = 297<BR> '指定打印机<BR> ThisDrawing.ModelSpace.Layout.ConfigName = "HP LaserJet 5100 PCL 6"<BR> '指定纸张<BR> ThisDrawing.ModelSpace.Layout.CanonicalMediaName = "A3"<BR> '指定打印样式<BR> ThisDrawing.ModelSpace.Layout.StyleSheet = "acad.ctb"<BR> '指定打印范围<BR> ThisDrawing.ModelSpace.Layout.SetWindowToPlot point1, point2<BR> '接收打印范围<BR> ThisDrawing.ModelSpace.Layout.GetWindowToPlot point1, point2<BR> '指定为窗口打印<BR> ThisDrawing.ModelSpace.Layout.PlotType = acWindow<BR> <BR> ThisDrawing.Plot.PlotToDevice</P>
<P>End Sub<BR>我编的打印程序,可每次运行到</P>
<P> '指定打印范围<BR> ThisDrawing.ModelSpace.Layout.SetWindowToPlot point1, point2<BR>就出错了,麻烦您帮看看是怎么回事?</P>
<P>谢谢了!</P>
<P>我是刚学的,程序很菜,请多指教!</P>
reply
<P>Public Sub Plot1()</P><P> Dim point1(0 To 1) As Double<BR> Dim point2(0 To 1) As Double</P>
<P> point1(0) = 0: point1(1) = 0<BR> <BR> point2(0) = 420: point2(1) = 297<BR> '指定打印机<BR> ThisDrawing.ModelSpace.Layout.ConfigName = "HP LaserJet 5100 PCL 6"<BR> '指定纸张<BR> ThisDrawing.ModelSpace.Layout.CanonicalMediaName = "A3"<BR> '指定打印样式<BR> ThisDrawing.ModelSpace.Layout.StyleSheet = "acad.ctb"<BR> '指定打印范围<BR> ThisDrawing.ModelSpace.Layout.SetWindowToPlot point1, point2<BR> '接收打印范围<BR> ThisDrawing.ModelSpace.Layout.GetWindowToPlot point1, point2<BR> '指定为窗口打印<BR> ThisDrawing.ModelSpace.Layout.PlotType = acWindow<BR> <BR> ThisDrawing.Plot.PlotToDevice</P>
<P>End Sub</P> <P>非常感谢王总!!!</P>
<P>小弟真是感激涕零啊!!!</P>
<P>再次跪谢!</P>
页:
[1]