I have been searching around for a code to compress photos and I don't want to be the bearer of the bad news but looks like MS Office didn't finish this part of excel since when you record a macro, the action on the button "Compress Pictures" under the Format tab doesn't record any string on a macro.
I had a file with 812 figures (it's a cattalogue) and I needed to reduce the file size since its weight was about 70mb, so i came up with this workaround that helped me to do the same but with a manual step in between.
What I did was:
1) Created a Macro to select all the shapes at once, with the code below:
Sub CompressingFigures()
Sheet1.Activate
ActiveSheet.Shapes.SelectAll
End Sub
2) After having all the 812 picutres selected I went to the tab PIcture Tools --> Format --> Compress Figures and selected manually the action