ActiveLayout.StyleSheet
<P>ThisDrawing.ActiveLayout.StyleSheet = "monochrome.ctb"</P><P>为什么出错?</P> <P>Public Sub printdoc()<BR>Dim point1(100) As Variant<BR>Dim point2 As Variant, point3 As Variant, point4(0 To 1) As Variant<BR>Dim keywordList As String<BR>On Error Resume Next<BR>With ThisDrawing.ActiveLayout<BR>.StyleSheet = "monochrome.ctb"<BR>.CenterPlot = True<BR>.PlotRotation = ac90degrees<BR>.PaperUnits = acMillimeters<BR>.CanonicalMediaName = "A4"<BR>.ConfigName = "HP LaserJet 5100 Series"<BR>End With<BR>point2 = ThisDrawing.Utility.GetPoint(, vbLf & "请点击打印区域的左下角:")<BR>i = 0<BR>Do While i < 1<BR> point1(i) = point2<BR> If Err.Number = -2147352567 Or Err.Number = 13 Then<BR> Exit Sub<BR> End If<BR> point2 = ThisDrawing.Utility.GetPoint(, vbLf & "请点击打印区域的右上角:")<BR> If (Int(point1(i)(1)) <> Int(point2(1))) Then<BR> i = i + 1<BR> point1(i) = point2<BR> End If<BR>Loop<BR>Number = ThisDrawing.Utility.GetInteger("Enter an number of the pages: ")<BR>point2 = point1(0)<BR>point3 = point1(1)<BR>ReDim Preserve point2(0 To 1)<BR>ReDim Preserve point3(0 To 1)<BR>For j = 0 To Number - 1<BR>point2(0) = point2(0) + (point3(0) - point2(0)) * j<BR>point3(0) = point3(0) + (point3(0) - point2(0)) * j<BR>ThisDrawing.ActiveLayout.CenterPlot = True<BR>ThisDrawing.ActiveLayout.SetWindowToPlot point2, point3<BR>ThisDrawing.Plot.NumberOfCopies = 1<BR>ThisDrawing.ActiveLayout.PlotType = acWindow<BR>ThisDrawing.Plot.DisplayPlotPreview acFullPreview<BR>Next j<BR>End Sub</P>
<P>为什么不能居中打印,还要设什么?</P> <P>问题解决了</P>
<P> </P>
页:
[1]