Hello to all,
I´m using VBA to export Excel data (Data + Pictures) to PowerPoint.
My issue is that, during procedure of copying pictures (2 pictures), those are being pasted on top of each other.
Code that is being used is:
Sub Copy_Shapes()
Dim sh As Shape, arrShapes() As Variant, i As Long
ReDim arrShapes(1 To ActiveSheet.Shapes.Count)For Each sh In ActiveSheet.Shapes
If Not Intersect(sh.TopLeftCell, ActiveCell.EntireRow) Is Nothing Then
i = i + 1
arrShapes(i) = sh.Name
End If
Next sh
ActiveSheet.Shapes.Range(arrShapes).Select
Selection.Copy
Set Slide = App.ActivePresentation.Slides(1)
With Slide.Shapes.PasteSpecial(ppPasteMetafilePicture)
.Left = 24#
.Top = 331
.Height = 130#
.Width = 281#
.Height = 140#
.Name = "issueFoto1"
If .Height > 156# Then .Height = 156#
.Line.ForeColor.ObjectThemeColor = msoThemeColorText0
.ZOrder msoSendToBack
End With
Anyone can help?
Thanks in advance
LS
Bookmarks