#1
|
|||
|
|||
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 i need a style Id that is green and orange. |
#2
|
||||
|
||||
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] |
|
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 |
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 |