Powerpoint VBA syntax for 'Crop to shape'?

I have a shape/image and would like to use VBA to perform the same functionality that I can achieve via the ribbon's "crop to shape".

 

Can anyone provide helpful syntax? I've been exploring the autocomplete menus to try to find it, and no luck so far. It may be called something other than CropToShape because I can't find it in the help files or on the web either.

 

Many thanks,

Keith

Answer
Answer
Hi Keith,

If you know the basic way to explore via VBA the PPT slides and shape placeholders the following is the code that will "crop" to a shape.

Dim shp as Shape
If shp.Type = msoLinkedPicture Or shp.Type = msoPicture Then
     shp.AutoShapeType = msoShape24pointStar
End If

________________________________
Richard V. Michaels
info@greatcirclelearning.com
Provides AuthorTec add-ins for Mac & Win-Office. Site: greatcirclelearning.com

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated August 2, 2023 Views 388 Applies to: