Skydolphin
12-26-2003, 12:24 PM
Hi.
I have an application that I am using the Outlook.ApplicationClass to send an email. I am building a long string of text for the body. Some of the text needs to be bolded or a different color. How is text formatted in this kind of thing.
sBody = sBody & sAdditionalText & Chr(13)
sBody = sBody & ThisMoment & Chr(13)
Would like this to be bold and red
sBody = sBody & "YOU MUST sign no later than " & sDeadlineText & "." & Chr(13) & Chr(13)
Dim olApp As Outlook.ApplicationClass
Dim olMailMessage As Outlook.MailItemClass
Dim olRecipient As Outlook.Recipient
Dim blnKnownRecipient As Boolean
olApp = New Outlook.Application
olMailMessage = olApp.CreateItem(Outlook.OlItemType.olMailItem)
With olMailMessage
olRecipient = .Recipients.Add(sTo)
.Importance = Outlook.OlImportance.olImportanceHigh
blnKnownRecipient = olRecipient.Resolve
.Subject = sSubject
.Body = sBody
If blnKnownRecipient = True Then
.Send()
End If
End With
olMailMessage = Nothing
Any suggestions would be greatly appreciated.
Thanks
Rhonda
I have an application that I am using the Outlook.ApplicationClass to send an email. I am building a long string of text for the body. Some of the text needs to be bolded or a different color. How is text formatted in this kind of thing.
sBody = sBody & sAdditionalText & Chr(13)
sBody = sBody & ThisMoment & Chr(13)
Would like this to be bold and red
sBody = sBody & "YOU MUST sign no later than " & sDeadlineText & "." & Chr(13) & Chr(13)
Dim olApp As Outlook.ApplicationClass
Dim olMailMessage As Outlook.MailItemClass
Dim olRecipient As Outlook.Recipient
Dim blnKnownRecipient As Boolean
olApp = New Outlook.Application
olMailMessage = olApp.CreateItem(Outlook.OlItemType.olMailItem)
With olMailMessage
olRecipient = .Recipients.Add(sTo)
.Importance = Outlook.OlImportance.olImportanceHigh
blnKnownRecipient = olRecipient.Resolve
.Subject = sSubject
.Body = sBody
If blnKnownRecipient = True Then
.Send()
End If
End With
olMailMessage = Nothing
Any suggestions would be greatly appreciated.
Thanks
Rhonda