troubleshooting Question

VBA code to select several cells of a Word table

Avatar of rexswain
rexswain asked on
Microsoft Word
4 Comments1 Solution2390 ViewsLast Modified:
I am new to the Word document object model, so forgive me if this is easy.  

I want to change the background color of several cells in a Word table.  I know how to iterate through the cells setting

 Cell(r,c).Shading.BackgroundPatternColor

on each cell.  But this is kinda slow, and I assume it would be faster for me to select a contiguous range of cells and set Shading on them all at once.  The cells are not an entire row or column.  I'm thinking I should be able to use Cells and/or Range to do this, but I have not been able to hit on a solution.

(If it makes a difference, I'm actually talking to a Word table embedded in a PowerPoint slide.)
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros