Morning all
I'm trying to make my workbook send to an email address listed in the worksheet with a subject title based on one of the cells.
I thought this was working until I noticed the subject line in the email was full of apparently random characters.
Any idea what I can change to put the text from cell b1 in my email subject line? I will admit to stealing the code so if there is something better please let me know.
I am using Excel and Outlook 2016 but would like it to work in 2010 too as we have mixed version atm
The code I am using is
Many thanks as always
I'm trying to make my workbook send to an email address listed in the worksheet with a subject title based on one of the cells.
I thought this was working until I noticed the subject line in the email was full of apparently random characters.
Any idea what I can change to put the text from cell b1 in my email subject line? I will admit to stealing the code so if there is something better please let me know.
I am using Excel and Outlook 2016 but would like it to work in 2010 too as we have mixed version atm
The code I am using is
HTML:
Sub Send1Sheet_ActiveWorkbook()
Dim strSubject As String
Dim strRecip As String
strSubject = Worksheets("mysheet").Range("b1")
strRecip = [a1].Value
With ActiveWorkbook
.SendMail Recipients:=strRecip, Subject:=strSubject
End With
End Sub
Many thanks as always