Hello:
I am doing a macro to be able to send info of a table to ask for a project status
Where NU is the row number wanted
Copyrange1 is the table heading and Copyrange2 is the row of the info wanted
with the current code I do not get ONLY the heading and the row i want. I get all the rows in between
How do I fix this????
PS: I also want to add my outlook signature to the email
I am doing a macro to be able to send info of a table to ask for a project status
Code:
Sub Button2_Click()
' Select the range of cells on the active worksheet.
Dim Copyrange1 As String
Dim Copyrange2 As String
NU = Range("A2").Value
Let Copyrange1 = "K" & 5 & ":" & "P" & 7
Let Copyrange2 = "K" & NU & ":" & "P" & NU
Range(Copyrange1, Copyrange2).Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
Dim s As String
s = "Hello" & vbCrLf & "Please process the following order" & vbCrLf & "Please confirm ammount and delivery date" & vbCrLf & "Best Regards"
With ActiveSheet.MailEnvelope
.Introduction = s
.Item.To = Range("S" & NU).Value
.Item.Subject = "My subject"
.Item.Send
End With
End Sub
Where NU is the row number wanted
Copyrange1 is the table heading and Copyrange2 is the row of the info wanted
with the current code I do not get ONLY the heading and the row i want. I get all the rows in between
How do I fix this????
PS: I also want to add my outlook signature to the email