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。 –