PrintableRect 对象 (Publisher)

代表指定打印机将在其中进行打印的纸张区域。 可打印矩形由打印机根据指定的纸型确定。 不应将打印机纸张的可打印矩形与出版物页面边距以内的区域相混淆;可打印矩形可能大于或小于出版物页面。

备注

在打印机纸张与出版物页面尺寸相等的情况下,出版物页面在打印机纸张上居中,并且不打印任何打印机标记(即使已将其选中)。

使用 Printer.PrintableRect 属性可返回 PrintableRect 对象。

示例

下面的示例返回当前出版物的打印机纸张的可打印矩形边界。

Sub ListPrintableRectBoundaries() 
 
With ActiveDocument.AdvancedPrintOptions.PrintableRect 
 
 Debug.Print "Printable area is " & _ 
 PointsToInches(.Width) & _ 
 " by " & PointsToInches(.Height) & " inches." 
 Debug.Print "Left Boundary: " & PointsToInches(.Left) & _ 
 " inches (from left)." 
 Debug.Print "Right Boundary: " & PointsToInches(.Left + .Width) & _ 
 " inches (from left)." 
 Debug.Print "Top Boundary: " & PointsToInches(.Top) & _ 
 " inches(from top)." 
 Debug.Print "Bottom Boundary: " & PointsToInches(.Top + .Height) & _ 
 " inches(from top)." 
 
End With 
 
End Sub 

属性

另请参阅

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。