OfficeTips Home || VBA Section || General Section || Download Section || Privacy Policy

How to Set Picture Shape

The new graphics engine in Office 2007 brings to fore a whole slew of new effects which makes the presentation richer. Reflection, soft shadows, 3D effects, glows and more. We shall see how to assign a picture shape in this example.

You just inserted a picture on the slide. By default the shape type has always been a rectangle. In PPT 2007, you can assign a different shape to the picture. In a sense this behaves similar to drawing the desire shape and then applying a picture fill but the properties are different.

Note that trying the same in earlier versions will give you 'Permission denied' error.


Sub AssignGlow()



Dim oShp As Shape

Dim oSld As SlideSet oSld = ActivePresentation.Slides(1)



'Insert picture.

Set oShp = oSld.Shapes.AddPicture("C:\Workarea\Picture001.png",False,True, 0, 0,720, 540)



'Change shape to desired autoshape

oShp.AutoShapeType = msoShape10pointStar



End Sub

 

 


Copyright 1999-2022 (c) Shyam Pillai. All rights reserved.