I am new to using Visual Basic. I am using Visual Basic in MS Excel. I am struggling to work out have to paste the screen shot into the email. I have the following, could you please tell what I need to enter.
Thanks
Sub AddToNaughtyList()
'
' AddToNaughtyList Macro
'
Range("Y3:Z3").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("U2:V2").Select
Selection.Copy
Range("Y3:Z3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E2").Select
Dim aOutlook As Object
Dim aEmail As Object
Dim StudentName As String
Dim SendAddress As String
' copy picture
Range("C6:S39").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
'setup email
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
StudentName = ActiveCell.Value
SendAddress = Range("D5")
'Cells(1, "A").Value
'Set Address
aEmail.To = SendAddress
'Set Subject
aEmail.Subject = "Weekly Progress Report for " & StudentName
'Set Body for mail
aEmail.HTMLBody = "<font face=calibri><html><body>Nat's *Student needs to attend Friday Detention* text goes here.</font><br /><br />" _
'paste into email???????????
aEmail.Display
I see the two possible solutions:
For example: