function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
saraAsaraA 

How to Bold words in HTML VisualForce email page

Hi - 
I'm creating a VisualForce email template to be sent out via a workflow.

The users would like certain words "Bolded", and others "Italicised".

I have searched and tried lots of things, so far all unsuccessful.  I thought this would be easy!

If anyone can help, i'd really appreciate it!  I copied the basic parts from a working email.  I'm just not getting my formatting (see my *** notes below).  I am pretty good at figuring out how to make my specifics work from a solution that has similar results, but I'm really stuck here.

Here's some of what I have so far:.  

<messaging:emailTemplate subject="New Instrument Ownership" recipientType="Contact" relatedToType="Class_Order__c">
<messaging:htmlEmailBody >

<html>
            <style type="text/css">
            body {font-family: arial; size: 12pt;}  *** I’m not getting Arial text; I’m getting Courier

            table {
            border-width: 5px;
            border-spacing: 5px;
           
            border-color: #FF0000;
            background-color: #FFFFFF;
        }

        td {
            border-width: 1px;
            padding: 4px;
            border-style: solid;
            border-color: #000000;
            background-color: #FFEECC;
        }

        th {
            color: #000000;
            border-width: 1px ;
            padding: 4px ;
            border-style: solid ;
            border-color: #000000;
            background-color: #FFFFF0;
        }
        </style>



<apex:image value="http://na15.salesforce.com/servlet/servlet.ImageServer?id=015i0000002yU39&oid=00Di0000000kwwg" />
<br/>
<br/>
Order Number: {!relatedTo.Name}


Dear {!RelatedTo.ChargentOrders__Billing_First_Name__c},
<br/>
This letter is to certify that {!relatedTo.Student_Name__c} is enrolled in: <br/>
        Class:  {!relatedTo.Class__c}<br/>  *** They want the variable “Class” BOLDed
        Days:  {!relatedTo.Days__c}<br/>  *** They want the variable “Days” BOLDed
<br/>
Thank you,<br/>
Your Counselor<br/>  ***  They want this text “Your Counselor” italicized.
<br/>
</html>
</messaging:htmlEmailBody>

Thanks!
Sara
Best Answer chosen by saraA
kaustav goswamikaustav goswami
You can do the following:

This letter is to certify that {!relatedTo.Student_Name__c} is enrolled in: <br/>
        Class:  <b>{!relatedTo.Class__c}</b><br/>  *** They want the variable “Class” BOLDed
        Days:  <b>{!relatedTo.Days__c}</b><br/>  *** They want the variable “Days” BOLDed
<br/>

Enclose that part in <b>...</b>.

That should od the trick. Please let me kno if this helps.
Thanks,
Kaustav

All Answers

kaustav goswamikaustav goswami
You can do the following:

This letter is to certify that {!relatedTo.Student_Name__c} is enrolled in: <br/>
        Class:  <b>{!relatedTo.Class__c}</b><br/>  *** They want the variable “Class” BOLDed
        Days:  <b>{!relatedTo.Days__c}</b><br/>  *** They want the variable “Days” BOLDed
<br/>

Enclose that part in <b>...</b>.

That should od the trick. Please let me kno if this helps.
Thanks,
Kaustav
This was selected as the best answer
saraAsaraA
Inhcredible!! I figured it had to be easy, but that is super-easy!  I even put "<i> and got my italics.

Now, why am I not printing in Arial?  I put "Arial" in the "font family" at the top of the page, but it's showing Courier.

Thanks SO much!
Sara