PowerPoint) (FillFormat.Pattern 屬性

會設定或傳回值,代表套用至指定之填滿的圖樣。 唯讀。

語法

運算式。圖樣

運算式 代表 FillFormat 物件的變數。

傳回值

MsoPatternType

註解

使用 BackColor 及 ForeColor 屬性,來設定圖樣中所使用的色彩。

範例

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

Set myDocument = ActivePresentation.Slides(1) 
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 支援與意見反應。