RAKESH230583
New Member
- Joined
- Jan 10, 2011
- Messages
- 46
Dear All,
I have below sub for creating the email - from data inputted in user form
I would like to know whether it is possible to convert the list of Case details in tabular format instead of list.
Sub Send_Email()
Dim olApp As Outlook.Application
Dim olemail As Outlook.MailItem
Dim emailaddress1, emailaddress2, emailaddress3 As String
Set olApp = New Outlook.Application
Set olemail = olApp.CreateItem(olMailItem)
Set emailaddress1 = Sheets("Email_Addresses").Range("C4")
Set emailaddress2 = Sheets("Email_Addresses").Range("C6")
With olemail
.BodyFormat = olFormatHTML
.Display
- '.HTMLBody = "Dear Team,<br>" & " <br> " & "Please find below detials refering to system issue reported.<br>" & .HTMLBody
- .HTMLBody = "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Dear Team,<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Please find below incident raised details.<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Request you to kindly check the same and do the needfull.<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;""<u><B>Case related Information:</u></B><br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case1:" & Create.TextBox1.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case2:" & Create.TextBox2.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case3:" & Create.TextBox3.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case4:" & Create.TextBox4.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case5:" & Create.TextBox5.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case6:" & Create.TextBox6.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case7:" & Create.TextBox7.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case8:" & Create.ComboBox8.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case9:" & Create.ComboBox9.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case10:" & Create.ComboBox10.Value & "<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;""<u><B>Other related Information:</u></B><br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case1:" & Create.ComboBox1.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case2:" & Create.ComboBox2.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case3:" & Create.ComboBox3.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case4:" & Create.ComboBox4.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case5:" & Create.ComboBox5.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case6:" & Create.ComboBox6.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case7:" & Create.TextBox8.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case8:" & Create.TextBox9.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case9:" & Create.TextBox10.Value & "<br>" & "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case10:" & Create.TextBox11.Value & "<br>" & -.HTMLBody
.To = emailaddress1
.CC = emailaddress2
.Subject = "System Issue" & " " & "::" & _
Create.ComboBox1.Value & " " & "::" & _
Create.ComboBox2.Value & " " & "::" & _
Create.ComboBox6.Value & " " & "::" & _
Create.ComboBox4.Value & " " & "::" & _
Create.TextBox1.Value
End With
End Sub
Unquote
I have below sub for creating the email - from data inputted in user form
I would like to know whether it is possible to convert the list of Case details in tabular format instead of list.
Sub Send_Email()
Dim olApp As Outlook.Application
Dim olemail As Outlook.MailItem
Dim emailaddress1, emailaddress2, emailaddress3 As String
Set olApp = New Outlook.Application
Set olemail = olApp.CreateItem(olMailItem)
Set emailaddress1 = Sheets("Email_Addresses").Range("C4")
Set emailaddress2 = Sheets("Email_Addresses").Range("C6")
With olemail
.BodyFormat = olFormatHTML
.Display
- '.HTMLBody = "Dear Team,<br>" & " <br> " & "Please find below detials refering to system issue reported.<br>" & .HTMLBody
- .HTMLBody = "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Dear Team,<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Please find below incident raised details.<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Request you to kindly check the same and do the needfull.<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;""<u><B>Case related Information:</u></B><br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case1:" & Create.TextBox1.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case2:" & Create.TextBox2.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case3:" & Create.TextBox3.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case4:" & Create.TextBox4.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case5:" & Create.TextBox5.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case6:" & Create.TextBox6.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case7:" & Create.TextBox7.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case8:" & Create.ComboBox8.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case9:" & Create.ComboBox9.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case10:" & Create.ComboBox10.Value & "<br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;""<u><B>Other related Information:</u></B><br>" & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case1:" & Create.ComboBox1.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case2:" & Create.ComboBox2.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case3:" & Create.ComboBox3.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case4:" & Create.ComboBox4.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case5:" & Create.ComboBox5.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case6:" & Create.ComboBox6.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case7:" & Create.TextBox8.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case8:" & Create.TextBox9.Value & "<br>" & _
- "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case9:" & Create.TextBox10.Value & "<br>" & "<font face=""Agfa Rotis Semisans Light"" style=""font-size:11pt;"">Case10:" & Create.TextBox11.Value & "<br>" & -.HTMLBody
.To = emailaddress1
.CC = emailaddress2
.Subject = "System Issue" & " " & "::" & _
Create.ComboBox1.Value & " " & "::" & _
Create.ComboBox2.Value & " " & "::" & _
Create.ComboBox6.Value & " " & "::" & _
Create.ComboBox4.Value & " " & "::" & _
Create.TextBox1.Value
End With
End Sub
Unquote
Last edited: