GradientStops.Delete 方法 (Office)
會移除漸層停駐點。
語法
運算式。刪除索引 ()
表達 會傳回 GradientStops 物件的 運算式。
參數
名稱 | 必要/選用 | 資料類型 | 描述 |
---|---|---|---|
Index | 選用 | Integer | 漸層停駐點的索引編號。 |
註解
漸層是從某個色彩狀態順利地轉換到另一個。 這些區段的端點稱為停止點。
範例
下列範例會新增三個漸層色彩停駐點,然後刪除第一個漸層停駐點。
Sub gradients()
Set myDocument = ActivePresentation.Slides(1)
Set GradientShapeFill = myDocument.Shapes.AddShape(msoShapeRectangle, 90, 90, 90, 80).Fill
With GradientShapeFill
.ForeColor.RGB = RGB(0, 128, 128)
.OneColorGradient msoGradientHorizontal, 1, 1
.GradientStops.Insert RGB(255, 0, 0), 0.25
.GradientStops.Insert RGB(0, 255, 0), 0.5
.GradientStops.Insert RGB(0, 0, 255), 0.75
End With
GradientShapeFill.GradientStops.Delete (1)
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。