Emboldening a string...

icezebra

Registered User.
Local time
Today, 13:54
Joined
Feb 12, 2007
Messages
22
This is where I'm at at the moment:
Code:
If Who = "SSR" Then
        
        Dim mess_body, Email, boldmess As String
        Dim appOutLook, MailOutLook
                
        Email = "Me"

        Set appOutLook = CreateObject("Outlook.Application")
        Set MailOutLook = appOutLook.CreateItem(olMailItem)

        mess_body = "Scheme: " + Scheme + vbCrLf
        mess_body = mess_body + "Pin: " + Pin + vbCrLf + vbCrLf
        mess_body = mess_body + "The " + Section + " section of the above scheme of yours has been accepted as " + SecStatus + " by the SSR Specialist.  Please enter SUMIS to see details." + vbCrLf + vbCrLf + "If you are no longer responsible for this project, email SUMIS support at mailto:SSRBristol. "
        
       [COLOR="Blue"] boldmess = "This is an automated email, please do not respond directly."[/COLOR]
        
        mess_body = mess_body + vbCrLf + vbCrLf + boldmess
        
        Set appOutLook = CreateObject("Outlook.Application")
        Set MailOutLook = appOutLook.CreateItem(olMailItem)

        With MailOutLook
            .To = Email
            .Importance = 2
            .Subject = "SUMIS Update"
            .Body = mess_body
            .DeleteAfterSubmit = False
            .Send

        End With
        
    End If

I'm passing a string to Outlook to be emailed. I would like to put the highlighted blue line above in bold so that Outlook recognises it as such. Is this possible? Any ideas?

Thanks!
 
Look into Outlook help for the .BODY to see if it breaks down further into a collection of items. If so, there is a chance that you could find the collection member containing your line and directly manipulate its attributes. If, on the other hand, there is no such collection then you won't be able to get there this way. You might have to generate this as a FILE and send the file.

By default, for items that contain a value, just naming the item selects the .VALUE property. So saying xxx.BODY = "string" MIGHT be the equal of having said xxx.BODY.VALUE = "string" - and if that is the case, check for other attributes of .BODY to exist.
 
There is an HTMLBody Attribute that you can use instead and format your text to however you would like.

Instead of .Body, use .HTMLBody = mess_body

Encapsulate any bold text as follows: <b>here</b>
The "here" would be the bold text.
 

Users who are viewing this thread

Back
Top Bottom