如何在[vba] [powerpoint]中为图像添加颜色边框



我需要添加边框到不同的图像,我有一个幻灯片演示文稿,我也在寻找如何将图像发送到字母背后的背景。有人能帮我吗

Sub ajustar2()
'imagenes  segunda diapo'
Set imagen1 = ActivePresentation.Slides(2)
imagen1.Shapes.AddPicture FileName:="D:IPh.png", LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=10, Top:=75, Width:=433, Height:=330

Set imagen2 = ActivePresentation.Slides(2)
imagen2.Shapes.AddPicture FileName:="D:IPd.png", LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=463, Top:=75, Width:=484, Height:=330
'imagenes  tercera diapo'
Set imagen1 = ActivePresentation.Slides(3)
imagen1.Shapes.AddPicture FileName:="D:IPh.png", LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=10, Top:=75, Width:=433, Height:=330

Set imagen2 = ActivePresentation.Slides(3)
imagen2.Shapes.AddPicture FileName:="D:IPv.png", LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=463, Top:=75, Width:=484, Height:=330

ActivePresentation.Slides(2).Select
Selection.ShapeRange.ZOrder msoSendToBack
End Sub

使用图片作为Shape对象并编辑其属性

Sub ajustar2()
Dim imagen1 As Slide, pic As Shape
Set imagen1 = ActivePresentation.Slides(1)
Set pic = imagen1.Shapes.AddPicture(FileName:="D:INFORMESPILAShazard.png", _
LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, Left:=10, Top:=75, _
Width:=433, Height:=330)
With pic
.Line.Weight = 5
.Line.ForeColor.RGB = RGB(255, 0, 0) 'choose RGB color combination
.ZOrder (msoSendToBack)
End With
End Sub

相关内容

  • 没有找到相关文章

最新更新