wes mcallister
New Member
- Joined
- May 19, 2011
- Messages
- 4
I would like to take a range of cells and insert them into an email that is automaticly created in a macro.
Range(A22, AH59) I want to = a string? then in the body of the email I could insert the string.
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim Req As String
Dim qty1 As String
qty1 = Range("E21: AH59).Text
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hi Team" & vbNewLine & vbNewLine & _
"I have created a new Work Order" & vbNewLine & _
"The Work Order # is " & Range("o3") & vbNewLine & _
"It is to " & Range("C11") & vbNewLine & _
"I would like to order the following parts" & vbNewLine & _
"" & qty1
Any ideas on how to do this.
I can get 1 cell to work but not a range of cells
Thanks in advance
Range(A22, AH59) I want to = a string? then in the body of the email I could insert the string.
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim Req As String
Dim qty1 As String
qty1 = Range("E21: AH59).Text
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hi Team" & vbNewLine & vbNewLine & _
"I have created a new Work Order" & vbNewLine & _
"The Work Order # is " & Range("o3") & vbNewLine & _
"It is to " & Range("C11") & vbNewLine & _
"I would like to order the following parts" & vbNewLine & _
"" & qty1
Any ideas on how to do this.
I can get 1 cell to work but not a range of cells
Thanks in advance