I am creating client reports that will need up to 200 pictures. I have the code to insert them, but it brings them in as linked objects, so clients can't see them since the pictures aren't on their network.
I found some code to insert them as shapes, but I'm not advanced enough to adapt my existing code to use Shapes.AddPicture, or vice versa. Can anyone advise on how to make this change?
Thanks so much!!
I found some code to insert them as shapes, but I'm not advanced enough to adapt my existing code to use Shapes.AddPicture, or vice versa. Can anyone advise on how to make this change?
Code:
Function insert1(PicPath, counter1)
'Formats Column A Pictures
With ActiveSheet.Pictures.Insert(PicPath)
With .ShapeRange
.LockAspectRatio = msoTrue 'If you uncomment both Width and Height lines below change to 'msoFalse'
'.Width = 50 'Adjust to change the WIDTH of your pictures - COMMENTED OUT
.Height = 198 'Adjust to change the HEIGHT of your pictures
End With
.Left = ActiveSheet.Range("B" & counter1).Left
.Top = ActiveSheet.Range("B" & counter1).Top
.Placement = 1
.PrintObject = True
End With
End Function
Thanks so much!!