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

Announcements

No record found.

News and Announcements icon
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,512

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

  • Verified answer
    Community Member Profile Picture
    on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans