Hi guys
I have compiled a vba to send emails through a web client using CDO, which works perfectly well. Which I can share if anyone needs it?
BUT I am struggling with one bit.
The code is quite large as it does a number of actions so I have cut all the other bits out and just included the section I am struggling with. I would like to send the order number which is in column B of the active sheet and row in the subject header of the email? It sends the email with the body text correct but the header comes out with "Review OrderTrue" without the text in cell B??
Please could some one point me in the right direction? Thanks.
Thanks
Pete
I have compiled a vba to send emails through a web client using CDO, which works perfectly well. Which I can share if anyone needs it?
BUT I am struggling with one bit.
The code is quite large as it does a number of actions so I have cut all the other bits out and just included the section I am struggling with. I would like to send the order number which is in column B of the active sheet and row in the subject header of the email? It sends the email with the body text correct but the header comes out with "Review OrderTrue" without the text in cell B??
Please could some one point me in the right direction? Thanks.
VBA Code:
Dim var As Variant: var = Range("B" & (ActiveCell.Row)).Select
strbody = "Hi" & vbNewLine & vbNewLine & _
"Please review the above order and forward to next department" & vbNewLine & _
"Thank you"
With iMsg
Set .Configuration = iConf
.To = "p******************.com"
.CC = ""
.BCC = ""
.From = """Pete"" <p****************.com>"
.Subject = "Review Order" & var
.TextBody = strbody
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
End Sub
Thanks
Pete