Consulting

Results 1 to 4 of 4

Thread: Adding Border and Shadow to an Image

  1. #1

    Adding Border and Shadow to an Image

    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!

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    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
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    Exactly like that! That was sure a heck of a lot easier than the methods I tried. Thanks a million, John!!

  4. #4
    Excellent

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •