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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

replace email template variables

(0) ShareShare
ReportReport
Posted on by 2,510

Hi, I am wondering how to replace the variables in an email template.  For example, I have the template: " dear {customer: customername}", how to find the variable and replace in c#? 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at
    RE: replace email template variables

    Hi sdnd2000,

    you can do it by OpenXml, in these pages you could find some useful info:

    https://social.msdn.microsoft.com/Forums/en-US/28a2849e-a304-4a1e-9c12-0d6e36ff2ab0/create-word-document-using-document-template-openxml-dll?forum=oxmlsdk 

    https://blogs.msdn.microsoft.com/vsod/2012/02/17/how-to-create-a-document-from-a-template-dotx-dotm-and-attach-to-it-using-open-xml-sdk/ 

    Hope it helps.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
UllrSki Profile Picture

UllrSki 2

#1
Community Member Profile Picture

Community Member 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans