Last active
January 12, 2025 14:16
-
-
Save blocoder/740aec77b0b7b7dfbe057d84347baf9b to your computer and use it in GitHub Desktop.
VBA-Makro ResetRecentColors()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ResetRecentColors() | |
' Zweck: | |
' In PowerPoint die Liste mit den zuletzt verwendeten Farben löschen | |
' und mit eigenen Farben (RGB-Farbcodes, max. 10) wieder auffüllen. | |
' Diese Farben können zur Hervorhebung von Texten verwendet werden. | |
' Quellen: | |
' https://www.TheSpreadsheetGuru.com/the-code-vault | |
' https://www.TheSpreadsheetGuru.com/add-recent-colors-to-powerpoint-palette/ | |
Dim ColorList As Variant | |
Dim i As Integer | |
' Array-Liste mit RGB-Farbcodes, | |
' die zu den zuletzt verwendeten Farben hinzugefügt werden (max. 10). | |
ColorList = Array( _ | |
RGB(245, 157, 64), _ | |
RGB(156, 245, 64), _ | |
RGB(160, 128, 95), _ | |
RGB(222, 64, 245), _ | |
RGB(64, 197, 245) _ | |
) | |
' ACHTUNG: Der letzte Wert in der ^^Liste endet OHNE Komma! | |
' Zuletzt verwendete Farben löschen. [OPTIONAL] | |
ActivePresentation.ExtraColors.Clear | |
' Durch die Liste der RGB-Farbodes gehen und | |
' zu den zuletzt verwendeten Farben hinzufügen. | |
For i = LBound(ColorList) To UBound(ColorList) | |
If i > 9 Then Exit For | |
ActivePresentation.ExtraColors.Add ColorList(i) | |
Next i | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment