sailor538 发表于 2006-4-13 09:27:00

ActiveLayout.StyleSheet

<P>ThisDrawing.ActiveLayout.StyleSheet = "monochrome.ctb"</P>
<P>为什么出错?</P>

sailor538 发表于 2006-4-13 13:20:00

<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 &amp; "请点击打印区域的左下角:")<BR>i = 0<BR>Do While i &lt; 1<BR>&nbsp; point1(i) = point2<BR>&nbsp; If Err.Number = -2147352567 Or Err.Number = 13 Then<BR>&nbsp; Exit Sub<BR>&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; point2 = ThisDrawing.Utility.GetPoint(, vbLf &amp; "请点击打印区域的右上角:")<BR>&nbsp;If (Int(point1(i)(1)) &lt;&gt; Int(point2(1))) Then<BR>&nbsp; i = i + 1<BR>&nbsp; point1(i) = point2<BR>&nbsp; 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>

sailor538 发表于 2006-4-13 13:30:00

<P>问题解决了</P>
<P>&nbsp;</P>
页: [1]
查看完整版本: ActiveLayout.StyleSheet