Hi guys and Girls.
Im on the final stages of the sheet im creating but cant figure the email bit out. The first version I had only emailed the image to the first email address, everyone else got a blank mail. So ive now found another macro that creates the pci but cant get it to work. Its sending the mail so that parts Anyone help pls?
Im on the final stages of the sheet im creating but cant figure the email bit out. The first version I had only emailed the image to the first email address, everyone else got a blank mail. So ive now found another macro that creates the pci but cant get it to work. Its sending the mail so that parts Anyone help pls?
VBA Code:
Sub createJpg(Namesheet As String, nameRange As String, nameFile As String)
ThisWorkbook.Activate
Worksheets(Namesheet).Activate
Set Plage = Workbooks("WS TemplateV2.xlsm").Worksheets("3.Shipment details").Range("A2:J50")
Plage.CopyPicture
With ThisWorkbook.Worksheets(Namesheet).ChartObjects.Add(Plage.Left, Plage.Top, Plage.Width, Plage.Height)
.Activate
.Chart.Paste
.Chart.Export Environ$("temp") & "\" & nameFile & ".jpg", "JPG"
End With
Worksheets(Namesheet).ChartObjects(Worksheets(Namesheet).ChartObjects.Count).Delete
Set Plage = Nothing
End Sub