I need to change color scheme of presentation to Office 2007-2010 though VBA code. How can I do that?
I tried something like below but doesn't seem to work.
ActivePresentation.ColorSchemes.Add
ActivePresentation.ColorSchemes(1).Colors(ppAccent1).RGB = RGB(0, 0, 1)
ActivePresentation.ColorSchemes(1).Colors(ppAccent1).RGB = RGB(0, 0, 2)
Changing color schemes in PowerPoint should be like this:
ActivePresentation.SlideMaster.Theme.ThemeColorScheme(msoThemeAccent1) = RGB(1, 2, 3)
There is a whole answer here:
Sub mkThemeCols()
With ActivePresentation.SlideMaster.Theme
.ThemeColorScheme(msoThemeAccent1) = RGB(255, 0, 0)
.ThemeColorScheme(msoThemeAccent2) = RGB(0, 255, 0)
.ThemeColorScheme(msoThemeAccent3) = RGB(0, 255, 255)
.ThemeColorScheme(msoThemeAccent4) = RGB(255, 255, 0)
.ThemeColorScheme(msoThemeAccent5) = RGB(23, 255, 10)
.ThemeColorScheme(msoThemeAccent6) = RGB(23, 255, 100)
.ThemeColorScheme(msoThemeDark1) = RGB(23, 0, 0)
.ThemeColorScheme(msoThemeDark2) = RGB(23, 23, 23)
.ThemeColorScheme.Save Environ("APPDATA") & "\Microsoft\Templates\Document Themes\Theme Colors\myNew Theme.xml"
End With
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.