Publisher) (ColorSchemes 物件
所有 ColorScheme 一群 Microsoft Publisher 中的物件。 每個 ColorScheme 物件代表色彩配置,這是一組的使用中出版物的色彩。
註解
使用 計數 若要返回 Publisher 的可用色彩配置的數目的屬性。
使用 Item 屬性可傳回特定的色彩配置的 ColorSchemes 集合。 Item屬性的Index引數可以是色彩配置的編號或名稱或PbColorScheme 常數。
使用的 名稱 若要傳回的色彩配置名稱的屬性。
範例
下列範例會顯示色彩配置的數目。
Sub CountColorSchemes()
MsgBox Application.ColorSchemes.Count
End Sub
下列範例會將使用中出版物的色彩配置設定為 [野花。
Sub SetColorScheme()
ActiveDocument.ColorScheme _
= ColorSchemes.Item(pbColorSchemeWildflower)
End Sub
下列範例會列出在文字方塊中所有可用之色彩配置給發行者。
Sub ListColorShemes()
Dim clrScheme As ColorScheme
Dim strSchemes As String
For Each clrScheme In Application.ColorSchemes
strSchemes = strSchemes & clrScheme.Name & vbLf
Next
ActiveDocument.Pages(1).Shapes.AddTextbox( _
Orientation:=pbTextOrientationHorizontal, _
Left:=72, Top:=72, Width:=400, Height:=500).TextFrame _
.TextRange.Text = strSchemes
End Sub
屬性
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。