共用方式為


Word) (FillFormat.Pattern 屬性

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

語法

運算式模式

表達 會傳回 FillFormat 物件的運算式。

範例

本範例會將矩形新增至 myDocument,並設定其填滿圖樣以符合名為 「rect1」 之圖案的填滿圖樣。新的矩形具有與 「rect1」 相同的模式,但不一定是相同的色彩。 使用 BackColorForeColor 屬性設定圖樣中使用的色彩。

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 支援與意見反應