none
Outlook 2010: Dynamic "fields"/area in e-mail template? RRS feed

  • Question

  • Is it possible to create a template that I can apply programmatically and send in parameters to?

    I would like to set up a template that has a header and footer. Then when I create an e-mail programmatically and apply this template to it, I can insert some custom data between them. Can this be done?

    All info I have found is about applying a template for the body area that can't have any custom text in it.

    Scenario:
    Outlook user makes a new appointment, fills in e-mail adress in a form region where a person (not invited to meeting) will get some custom information about the meeting. When the Outlook user click send button, code behind runs and programatically sends an e-mail to the e-mailaddress. The e-mail should have the custom information about the meeting, and have a special template that uses images and text defined in that template.

    Monday, August 8, 2011 8:56 AM

Answers

  • You can create a template that's HTML and set HTMLBody of an email to that content. You do have to make sure you don't use HTML elements that Outlook won't render. Your best bet for that is to actually design what you want and examine the HTMLBody content to see how it's rendered using the WordMail in Outlook.
     
    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Jimmy-san" <=?utf-8?B?SmltbXktc2Fu?=> wrote in message news:09ca95cc-077c-4287-b5fd-aaf13a2d308b...

    Is it possible to create a template that I can apply programmatically and send in parameters to?

    I would like to set up a template that has a header and footer. Then when I create an e-mail programmatically and apply this template to it, I can insert some custom data between them. Can this be done?

    All info I have found is about applying a template for the body area that can't have any custom text in it.

    Scenario:
    Outlook user makes a new appointment, fills in e-mail adress in a form region where a person (not invited to meeting) will get some custom information about the meeting. When the Outlook user click send button, code behind runs and programatically sends an e-mail to the e-mailaddress. The e-mail should have the custom information about the meeting, and have a special template that uses images and text defined in that template.


    Ken Slovak MVP - Outlook
    • Marked as answer by Jimmy-san Tuesday, August 9, 2011 8:38 AM
    Monday, August 8, 2011 1:50 PM