Accessing Objects on Slidemaster with VBA code

markeyk
NewLounger
Posts: 2
Joined: 24 Aug 2010, 12:11

Accessing Objects on Slidemaster with VBA code

Post by markeyk »

Hi
I have almost 700 presentations which contain over 8,000 slides. I need to change the color of a range of shape objects on the slide masters.

I know a little about VBA but I have never coded in PowerPoint. What I need is a VBA script that will change the color of all shapes in all slidemasters. I would expect that the script will iterate through a collection of slidemasters and then a collection of shapes on each master, and change the shape fillcolor. But I cannot figure how to do it.

All suggestions gratefully received. :hairout:

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Accessing Objects on Slidemaster with VBA code

Post by HansV »

Welcome to Eileen's Lounge!

Which version of PowerPoint are you using? Unfortunately, PowerPoint VBA changes from version to version...
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Accessing Objects on Slidemaster with VBA code

Post by HansV »

Something else: the placeholders for title, text, footer text, slide number etc. all count as shapes - do you want to change the color for those too, or just that of "other" shapes placed on the slide master designs?

(And I assume that you mean the fill color for the shapes - is that correct)?
Best wishes,
Hans

markeyk
NewLounger
Posts: 2
Joined: 24 Aug 2010, 12:11

Re: Accessing Objects on Slidemaster with VBA code

Post by markeyk »

Will post in detail later, but I solved this by rooting around in the VBA help. I have created a crude but working solution, when I have refined it I will post here in a few days.

Thank you for your interest.