FillFormat.Pattern 屬性 (Word)

會傳回或設定 MsoPatternType 常數,代表套用至指定的填滿或線條的圖樣。 唯讀。

語法

運算式。圖樣

運算式 傳回 FillFormat 物件的運算式。

範例

此範例會將矩形新增到 myDocument,並將其填滿模式設定為與名為 “rect1” 的圖形相符。新的矩形與 “rect1” 具有相同的模式,但不一定是相同的色彩。 使用 BackColor 及 ForeColor 屬性設定圖樣中使用的色彩。

Set myDocument = ActiveDocument 
With myDocument.Shapes 
 pattern1 = .Item("rect1").Fill.Pattern 
 With .AddShape(msoShapeRectangle, 100, 100, 120, 80).Fill 
 .ForeColor.RGB = RGB(128, 0, 0) 
 .BackColor.RGB = RGB(0, 0, 255) 
 .Patterned pattern1 
 End With 
End With

另請參閱

FillFormat 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。