PDA

View Full Version : [SOLVED:] Adding Border and Shadow to an Image



hunter21188
11-26-2015, 10:46 AM
Hey, y'all. I am having trouble figuring out how to add a shadow and border to an image I am inserting in a powerpoint 2010 slide. This is the code that inserts the image:


If ComboBox3 = "WWA Graphic" Then
ActiveWindow.Selection.SlideRange.Shapes.AddPicture _
FileName:="File Location", _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, Left:=408, Top:=80, _
Width:=310, Height:=241


Is there a way to simply add to this code to make sure that the picture includes a black, 2pt border and a shadow offset slight to the bottom-right?

Thanks!

John Wilson
11-26-2015, 11:49 AM
Something like this?


With ActiveWindow.Selection.SlideRange.Shapes.AddPicture _ (FileName:="path here", _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, Left:=408, Top:=80, _
Width:=310, Height:=241)
.Line.Weight = 2
.Line.ForeColor.RGB = vbBlack
.Shadow.Type = msoShadow21
End With
End If

hunter21188
11-26-2015, 12:07 PM
Exactly like that! That was sure a heck of a lot easier than the methods I tried. Thanks a million, John!!

Rafea1979
12-28-2015, 06:39 PM
Excellent