Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-27-2013, 03:11 PM
preetidb preetidb is offline Change accent theme color used as shape fill (not RGBs) Windows 7 32bit Change accent theme color used as shape fill (not RGBs) Office 2010 32bit
Novice
Change accent theme color used as shape fill (not RGBs)
 
Join Date: Dec 2013
Posts: 3
preetidb is on a distinguished road
Question Change accent theme color used as shape fill (not RGBs)

Hi,



Is it possible to select a shape on a slide that uses accent 1 as its fill colour and change its fill colour to accent 2 using vba? I would prefer to use the accents rather than RGBs so that it doesn't matter which color theme is used.

Many thanks,
preetidb
Reply With Quote
  #2  
Old 12-28-2013, 03:48 AM
JohnWilson JohnWilson is offline Change accent theme color used as shape fill (not RGBs) Windows 7 64bit Change accent theme color used as shape fill (not RGBs) Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You need to say whether you are working in edit mode or show mode.

In EDIT only this is the code:

Code:
Sub AC2()
Dim oshp As Shape
Set oshp = ActiveWindow.Selection.ShapeRange(1)
oshp.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent2
End Sub
It will NOT work in show mode.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 12-28-2013, 07:06 PM
preetidb preetidb is offline Change accent theme color used as shape fill (not RGBs) Windows 7 32bit Change accent theme color used as shape fill (not RGBs) Office 2010 32bit
Novice
Change accent theme color used as shape fill (not RGBs)
 
Join Date: Dec 2013
Posts: 3
preetidb is on a distinguished road
Smile

Hi John,

I am working in edit mode. Thank you for your help - it was just what I needed. I found many examples but the majority used RGBs and then the confusion on my part with schemecolor/themecolor.

Regards,
preetidb
Reply With Quote
  #4  
Old 12-29-2013, 12:46 AM
JohnWilson JohnWilson is offline Change accent theme color used as shape fill (not RGBs) Windows 7 64bit Change accent theme color used as shape fill (not RGBs) Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Schemecolor is legacy code for use in ppt2003 and earlier.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 12-30-2013, 03:22 PM
preetidb preetidb is offline Change accent theme color used as shape fill (not RGBs) Windows 7 32bit Change accent theme color used as shape fill (not RGBs) Office 2010 32bit
Novice
Change accent theme color used as shape fill (not RGBs)
 
Join Date: Dec 2013
Posts: 3
preetidb is on a distinguished road
Default

Thank you!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change accent theme color used as shape fill (not RGBs) What logic does P.P. use to move elements on theme change? Malcom PowerPoint 2 05-24-2013 02:55 AM
color change for same shape ajkiran PowerPoint 1 11-10-2012 07:41 AM
Change accent theme color used as shape fill (not RGBs) Change Colour Theme in Word with VBA Davidoff78 Word VBA 1 06-28-2012 05:23 PM
Change accent theme color used as shape fill (not RGBs) Help: office 2010 lost its color theme lczlcz Office 7 03-26-2012 11:37 PM
Change accent theme color used as shape fill (not RGBs) Change Automatic Fill Color Leanne PowerPoint 1 11-04-2009 08:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft