Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a userform, and the idea being that people can fill it in with
information and hit the send button, which whisks it away. I want the information split into lines so its easier to read, rather than it being a long string. ..HTMLBody = TextBox1.Value & vbCr & TextBox2.Value & vbCrLf & TextBox3.Value & vbNewLine & TextBox4.Value trying different types of new line to try and get one of them to work. But I still end up with all the information in 1 line, all next to each other..... Full macro: Private Sub CommandButton1_Click() Dim iMsg As Object Dim iConf As Object Dim sh As Worksheet Dim rng As Range Dim Flds As Variant Dim nam As Variant nam = Environ("UserName") Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds ..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "XXX" ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0 .Update End With Application.ScreenUpdating = False With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = """Pre Visit Call Missed"" <no@ddress" .Subject = "Completed by " & nam .HTMLBody = TextBox1.Value & vbCr & TextBox2.Value & vbCrLf & TextBox3.Value & vbNewLine & TextBox4.Value & vbCrLf & TextBox5.Value & vbCrLf & TextBox6.Value & vbCrLf & TextBox7.Value .Send End With Set iMsg = Nothing Set iConf = Nothing Unload Me End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculate working days but change working week | Excel Discussion (Misc queries) | |||
Making weekend days working days - the system cuts the working tim | Excel Discussion (Misc queries) | |||
Newly created Get Function is not working when I copied the syntax from a working function | Excel Programming | |||
Macro working in Excel 2003; not working in Excel 2000 | Excel Programming | |||
Adding sales from a non working day to the previous working day | Excel Programming |