web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

change font-family in message template body using javascript

(0) ShareShare
ReportReport
Posted on by 828

Hi Everyone,

 

I wrote a Javascript to fetch the template and populate on the message body.  Now i would like to change the font-family and font-size of the content in the message body. 

8407.Screenshot_5F00_1.jpg

i tried  this following code inside the javascript and its not working. 

document.body.style.fontSize="10px";
document.body.style.fontFamily="somefont"

or

* {
font-family: somefont ;
font-size: 10px;
}                                      

any other suggestions are welcome.

*This post is locked for comments

I have the same question (0)
  • sardar ahmed Profile Picture
    520 on at

    Hi Ram,

    You can use style attribute for changing the font.

    <p style="font-size:12px">Your text<p>

    Thanks and Regards

    Sardar Ahmed

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi Ram,

    Can you actually fix the fonts in template itself?

    Correct the format in template in a word document and paste in the template body.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans