Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-08-2013, 01:08 PM
bremen22 bremen22 is offline Assigning table style colors with VBA Windows 7 64bit Assigning table style colors with VBA Office 2007
Advanced Beginner
Assigning table style colors with VBA
 
Join Date: Jul 2013
Posts: 44
bremen22 is on a distinguished road
Default Assigning table style colors with VBA

I have a macro that will take data in an excel workbook and build tables with that data in PowerPoint. The last issue I have is that of color. I would like to color code my tables. Now I have the proper coding to make it happen, but I am runnnig into a compatability issue.



I am assigning the colors by use of the table style id. I like how the preset table styles look so I dont need to do anything fancy. The problem is the table style ids that are in Excel do not match that of any that are in PowerPoint.

If I use this style id
Code:
2A488322-F2BA-4B5B-9748-0D474271808F
In Powerpoint it is an orage theme, but when I put that style into Excel it builds the table style as red.

i need a style Id that is green and orange.
Reply With Quote
  #2  
Old 10-01-2013, 05:23 PM
macropod's Avatar
macropod macropod is offline Assigning table style colors with VBA Windows 7 32bit Assigning table style colors with VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Since neither the Style IDs nor their formats in PowerPoint and Excel correspond, you'll need to take a different approach. You could, for example, create a custom style in Excel with the same attributes.

FWIW, on my system (using Office 2010), the PowerPoint Style ID 2A488322-F2BA-4B5B-9748-0D474271808F (which is described as 'Medium Style 3 - Accent 6') doesn't produce a green and orange table. Instead, the table has an orange header row with alternating grey-banded rows below. The Excel equivalent of that is described there as 'Medium 21'. The differences between what you're describing and what I'm seeing in Office 2010 suggests you could run into problems trying to run the code with Style IDs in later Office versions. Accordingly, you should consider creating your own Table Styles for both PowerPoint and Excel, and use those instead.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table jumping to next page when changing heading style. Tom Wolowiec Word 0 07-16-2013 12:31 PM
Assigning table style colors with VBA Unable to change font colors from theme colors choy Word 3 08-01-2012 09:12 PM
How to change style of text in table? SCMiller Word VBA 1 04-24-2012 08:31 AM
Macro to Table Style ubns Word VBA 1 04-16-2012 05:01 AM
How to have this Heading – Table of contents style? Jamal NUMAN Word 0 01-13-2011 06:02 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:56 AM.


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