I’ve read as many examples as I could find and made many attempts and I’ve tried to go through the MIS docs on the PowerPoint object model. I feel stupid at this point trying to do something that SHOULD be simple. I want to apply a new fore color to the selected shapes on the current slide. Anyone done it?
Jonathan
Here is one method. Change the RGB values to what you need.
tell application "Microsoft PowerPoint"
activate
set theShapeRange to shape range of selection of active window
set shapeCount to (count shapes of theShapeRange)
repeat with i from 1 to shapeCount
tell shape i of theShapeRange
set fore color of fill format of it to {255, 105, 180}
set back color of fill format of it to {255, 105, 180}
end tell
end repeat
end tell
Model: Mac Pro (Mid 2010)
AppleScript: 2.7
Browser: Firefox 79.0
Operating System: macOS 10.14
Thanks a lot! I was really pulling my hair out. I thought I was able to address the range as though it was a single object. That’s what was killing me. All I had to do was iterate through?! Bizarre. I wonder if shape range operates differently in AppleScript than it does in VBScript on Windows. Thanks again for the method!