Hi Folks
The amount I know about writing macros could probably be written on the back of a postage stamp so please bear with me Everything I've ever created has been copied from various websites and through a process of substation, trial and error I've eventually got it working.
I've got the below which works fine, but i want to add text into the body of the email. I can insert an "introduction" but it doesn't really display how I would like. In another similar
I've tried .body, item.body, .htmlbody and can't get anything to work. Out of interest I also wonder why my code has .item.To, .item.CC etc when most of the other code I see just has .to, .cc etc. I'm thinking this is how the email is being created and linked to my original problem?
As a second and much less important note, I would like to add my signature to the email. Is there a quick and easy way of doing this?
Many thanks in advance
Dave
Private Sub CommandButton1_Click()
YesNo = MsgBox("Do you really want to email Mick and the CM's?", vbYesNo)
Select Case YesNo
Case vbYes
ActiveSheet.Range("B2:U37").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Item.To = "myemail"
.Item.CC = "myemail"
.Item.Subject = "daily sales inc P&D's"
.Item.Send
End With
Case vbNo
End Select
End Sub
The amount I know about writing macros could probably be written on the back of a postage stamp so please bear with me Everything I've ever created has been copied from various websites and through a process of substation, trial and error I've eventually got it working.
I've got the below which works fine, but i want to add text into the body of the email. I can insert an "introduction" but it doesn't really display how I would like. In another similar
macro, I use
.item.display instead of .item.send so I can edit the body text before I send it.I've tried .body, item.body, .htmlbody and can't get anything to work. Out of interest I also wonder why my code has .item.To, .item.CC etc when most of the other code I see just has .to, .cc etc. I'm thinking this is how the email is being created and linked to my original problem?
As a second and much less important note, I would like to add my signature to the email. Is there a quick and easy way of doing this?
Many thanks in advance
Dave
Private Sub CommandButton1_Click()
YesNo = MsgBox("Do you really want to email Mick and the CM's?", vbYesNo)
Select Case YesNo
Case vbYes
ActiveSheet.Range("B2:U37").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Item.To = "myemail"
.Item.CC = "myemail"
.Item.Subject = "daily sales inc P&D's"
.Item.Send
End With
Case vbNo
End Select
End Sub