1
我需要通过VBA代码将演示文稿的颜色方案更改为Office 2007-2010。我怎样才能做到这一点?Powerpoint VBA - 更改颜色方案
我试图像下面,但似乎没有工作。在PowerPoint
ActivePresentation.ColorSchemes.Add
ActivePresentation.ColorSchemes(1).Colors(ppAccent1).RGB = RGB(0, 0, 1)
ActivePresentation.ColorSchemes(1).Colors(ppAccent1).RGB = RGB(0, 0, 2)
如果主题颜色是出口到* .xml *文件,您可以简单地设置(加载)演示文稿在SlideMaster上:'ActivePresentation.SlideMaster.Theme.ThemeColorScheme.Load“C:\ Theme Colors \ Office 2007 - 2010.xml”'将路径更改为存储xml文件的位置。 – PatricK
您应该能够在'%USERPROFILE%\ AppData \ Roaming \ Microsoft \ Templates \ Document Themes \ Theme Colors'中找到自定义颜色xml文件。 – PatricK
下面回答了问题,但值得指出的是,ColorSchemes仅在2007年之前与PPT版本向后兼容。对于PPT 2007和以后版本,您需要使用ColorThemes。 –