Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Email Formatting
I was wanting to add some bold highlighting to the body of an e-mail that I'm
automatically generating with this bit of code. Now I know that there is no way to do formatting within the strbody, as it is just a string of text. However is there some way to do that if I were to put the text into the .Body = Spot??? Specifically I want the CURmonth to be bolded within the body, what might that look like? Thanks!!!! Dim OutApp As Object Dim OutMail As Object Dim strbody As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) CURmonth = CStr(MonthName(Month(Now) - 1)) strbody = "Text " & CURmonth & "Text" On Error Resume Next With OutMail .To = e-mail address .CC = "" .BCC = "" .Subject = "TEXT" .Body = strbody .Attachments.Add ("FILENAME") .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Email Formatting
Try .HTMLBody instead of .Body
Then use HTML coding to bold the desired text. Example: The following word <b is </b in bold. Good Luck. "bodhisatvaofboogie" wrote: I was wanting to add some bold highlighting to the body of an e-mail that I'm automatically generating with this bit of code. Now I know that there is no way to do formatting within the strbody, as it is just a string of text. However is there some way to do that if I were to put the text into the .Body = Spot??? Specifically I want the CURmonth to be bolded within the body, what might that look like? Thanks!!!! Dim OutApp As Object Dim OutMail As Object Dim strbody As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) CURmonth = CStr(MonthName(Month(Now) - 1)) strbody = "Text " & CURmonth & "Text" On Error Resume Next With OutMail .To = e-mail address .CC = "" .BCC = "" .Subject = "TEXT" .Body = strbody .Attachments.Add ("FILENAME") .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with formatting / saving before I email my worksheet | Excel Discussion (Misc queries) | |||
Validating email address formatting | Excel Worksheet Functions | |||
How do I disable email formatting. | Excel Discussion (Misc queries) | |||
Formatting email and web addresses in Excel | New Users to Excel | |||
formatting email from excel to outlook | Excel Programming |