PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, July 27, 2022

[FIXED] How to crop an image with VBA to a specific form e.g. circle in PowerPoint?

 July 27, 2022     crop, powerpoint, shape, vba     No comments   

Issue

I would like to crop a square image shape in PowerPoint with VBA to a specific form e.g. a circle.

With Shape.PictureFormat there are only these options:

  • .CropBottom
  • .CropLeft
  • .CropRight
  • .CropTop

Can someone help me with this question?

Thanks!

Moe


Solution

From Microsoft Community - you can use Shape.AutoShapeType to "crop to shape."

Sub CropToCircle()
    Dim shp As Shape
    Set shp = ActivePresentation.Slides(1).Shapes(1)

    If shp.Type = msoLinkedPicture Or shp.Type = msoPicture Then
        shp.AutoShapeType = msoShapeOval
    End If
End Sub


Answered By - BigBen
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing